简体   繁体   中英

Ghost CMS - sudo npm install --production - Error

i am trying to install ghost cms on a local vagrant box.

After i type in "sudo npm install --production" i get this error:

npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--production"

npm ERR! node v4.2.3

npm ERR! npm  v3.5.1

`npm ERR! path /var/www/html/ghost/node_modules/node-pre-

`gyp/node_modules/rc/node_modules/strip-json-comments/cli.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/var/www/html/ghost/node_modules/node-pre-gyp/node_modules/rc/node_modules/strip-json-comments/cli.js'
npm ERR! enoent ENOENT: no such file or directory, chmod '/var/www/html/ghost/node_modules/node-pre-gyp/node_modules/rc/node_modules/strip-json-comments/cli.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

Can anyone help me with this?

I was running into the same problem, and I fixed it by running the following in /usr/bin

$ sudo apt install nodejs-legacy

Once installed, head back over to your ghost installation directory, and re-run sudo npm install --production

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM