Ghost CMS - sudo npm install --production - 错误

时间:2015-12-09 00:31:47

标签: node.js npm blogs ghost

我正在尝试在当地的流浪盒上安装幽灵cms。

输入" sudo npm install --production"我收到这个错误:

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 

任何人都可以帮我吗?

1 个答案:

答案 0 :(得分:1)

我遇到了同样的问题,我通过在/usr/bin

中运行以下内容来修复它
$ sudo apt install nodejs-legacy

安装完成后,请返回ghost安装目录,然后重新运行sudo npm install --production