gpt4 book ai didi

ghost-blog - 幽灵安装npm

转载 作者:行者123 更新时间:2023-12-03 08:27:34 28 4
gpt4 key购买 nike

运行此命令时出现错误:

npm install --production

请帮忙。

npm ERR! install Couldn't read dependencies
npm ERR! package.json ENOENT, open '/root/package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.

npm ERR! System Linux 2.6.32-042stab088.4
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--production"
npm ERR! cwd /root
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.4
npm ERR! path /root/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/npm-debug.log
npm ERR! not ok code 0

我尝试用Ghost执行目录下的命令。并出现了这个错误:

sqlite3@2.2.0 install /var/www/node_modules/sqlite3 node-pre-gyp install --fallback-to-build

/usr/bin/env: node: No such file or directory
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! sqlite3@2.2.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the sqlite3@2.2.0 install script.
npm ERR! This is most likely a problem with the sqlite3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls sqlite3
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 2.6.32-042stab088.4
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--production"
npm ERR! cwd /var/www
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.4
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/www/npm-debug.log
npm ERR! not ok code 0`

最佳答案

从你的输出来看,在我看来你不在 Ghost 安装目录中。能否请您尝试cd到Ghost源码所在目录,再运行命令?

关于ghost-blog - 幽灵安装npm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24101237/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com