NodeJS - виртуальная среда
Форум
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Ryan
  2. Friday, 27 April 2018
  3.  Subscribe via email
Love the NodeJS integration so far. When I enter the command it shows in cpanel to enter the virtual environment, and then I run an npm install with save

npm install socket.io --save

It install and works, but it gives some warnings about the package.json file not being there, so it doesn't write the dependencies. I've also tried changing the current dir when running the command to the actual directory where the package.json file exists. Same issue.

The path where the app and package.json files are is:
/home/$username/public_html/nodejs/$app/

And the environment is
/home/$username/nodevenv/public_html/nodejs/$app/8
Rate this post:
Accepted Answer
  1. 02.05.2018 20:05:33
  2. # Permalink
Ryan Accepted Answer
Posts: 22
Joined: 18.10.2016
0
Votes
Undo
For anyone interested, my particular problem was running the commands as the root user. You need to be logged in as the account user.


There are no replies made for this post yet.
Be one of the first to reply to this post!
гость
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.