gpt4 book ai didi

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

转载 作者:搜寻专家 更新时间:2023-10-31 22:54:14 25 4
gpt4 key购买 nike

我在终端中编写的内容以像往常一样部署:

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 调试日志。


附注:我确实在全局安装了 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 的情况下重新安装。

希望这对您有所帮助!

关于node.js - 部署到 App Engine 会产生 gulp 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42180957/

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