node.js – 部署到App Engine会产生gulp错误吗?

我在终端中写的像往常一样部署:

gcloud app deploy

我得到的错误

Application startup error:

> meanjs@0.5.0 start /app
> gulp

sh: 1: gulp: not found

npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/nodejs/bin/node" "/nodejs/bin/npm" "start"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! meanjs@0.5.0 start: `gulp`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the meanjs@0.5.0 start script 'gulp'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do,this is most likely a problem with the meanjs package,npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs meanjs
npm ERR! Or if that isn't available,you can get their info via:
npm ERR!     npm owner ls meanjs
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /app/npm-debug.log

使用Mean.js:https://github.com/meanjs/mean

找不到npm调试日志.

P.S.:我确实在全球安装了gulp

$sudo npm install gulp-cli -g

解决方法

首先,您不需要使用sudo.

您可以在终端中输入以下内容来修复错误

npm config set prefix ~/npm

# add this to your .bashrc (or .zshrc or whatever you are using)
export PATH="$PATH:$HOME/npm/bin"

然后在没有sudo的情况下重新安装.

希望这可以帮助!

相关文章

这篇文章主要介绍“基于nodejs的ssh2怎么实现自动化部署”的...
本文小编为大家详细介绍“nodejs怎么实现目录不存在自动创建...
这篇“如何把nodejs数据传到前端”文章的知识点大部分人都不...
本文小编为大家详细介绍“nodejs如何实现定时删除文件”,内...
这篇文章主要讲解了“nodejs安装模块卡住不动怎么解决”,文...
今天小编给大家分享一下如何检测nodejs有没有安装成功的相关...