node.js - Ghost CMS - sudo npm install --product - 错误

标签 node.js npm blogs ghost

我正在尝试在本地流浪盒上安装 Ghost cms。

在我输入“sudo npm install --product”后,我收到此错误:

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 

有人可以帮我解决这个问题吗?

最佳答案

我遇到了同样的问题,我通过在 /usr/bin 中运行以下命令来修复它

$ sudo apt install nodejs-legacy

安装后,返回 Ghost 安装目录,然后重新运行 sudo npm install --product

关于node.js - Ghost CMS - sudo npm install --product - 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34168741/

相关文章:

html - 尝试在博客上上传我自己编写的代码时如何修复 "Could not load theme preview: Error parsing XML,"

node.js - Flutter WebSockets 连接到 Socket.io 服务器

node.js - 您如何获得在 https 中使用的 key 和证书对?

node.js - Passport 认证系统不工作

javascript - Angular 构建失败,找不到模块

ruby-on-rails - 如何计算 Ruby 字符串中 url 和超链接的出现次数?

css - 什么 css 导致我奇怪的自动换行?

javascript - 如何将附加参数传递给事件处理程序?

node.js - 在 AWS Lambda 上运行 SQLite3

node.js - AWS Elastic BeanStalk nodejs 部署错误