title: Cloudlinux NodeJS demands to store node modules for application in separate folder (virtual environment) pointed by symlink called "node_modules"
body: <p>I was looking to deploy my Nodejs/TypeScript web application to my cpanel shared hosting. But, I am getting an error:</p>
  <p>*</p>
  <blockquote>
  <p>Cloudlinux NodeJS Selector demands to store node modules for
  application in a separate folder (virtual environment) pointed by
  symlink called &quot;node_modules&quot;. That's why the application should not
  contain folder/file with such name in application root*
  <a href="https://i.stack.imgur.com/pa3NK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/pa3NK.png" alt="enter image description here" /></a>
  I have created a nodejs application. The final nodejs/typescript folders-files were moved to the nodejs application directory. I also was able to install TypeScript as well as run yarn install after copying my virtual environment and running it from my local terminal by running ssh.</p>
  </blockquote>
  <p>The issues is, from my nodejs application end, I cant 'run any script' or 'npm install' neither can I from my virtual terminal.
  But yarn run real fine.
  I'm also aware that another folder was created in my root hosting path called /nodevenv/ where another instance of my domain/sub-domain name lives.
  <a href="https://i.stack.imgur.com/dI9Cd.png" rel="noreferrer"><img src="https://i.stack.imgur.com/dI9Cd.png" alt="enter image description here" /></a>
  Node executables folder/files.
  What I dont know is, does it have anything to do with running npm script? Again, does it have anything to do with my application path?</p>
  <p>Another weird thing I couldn't figure out is how to run the frontend and backend together. They both run fine on my local machine.</p>
  <ul>
  <li>Do I create a subdomain for the server-side and the frontend from the main domain?</li>
  <li>I want them to run together as they were running on the same port from my localhost: 8080.</li>
  <li>How do I set them to run on the same port from my sharedhosting</li>
  <li>What I did is, creating a proxy from the frontend package.json file like so:
  <em>&quot;proxy&quot;: &quot;example.com&quot;</em> and it was running fine from local machine.</li>
  </ul>