首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >部署到Deploying会产生错误吗?

部署到Deploying会产生错误吗?
EN

Stack Overflow用户
提问于 2017-02-11 20:36:36
回答 3查看 625关注 0票数 5

我在终端中所写的与往常一样部署的内容:

代码语言:javascript
复制
gcloud app deploy

我所犯的错误:

代码语言:javascript
复制
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

代码语言:javascript
复制
$ sudo npm install gulp-cli -g
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2017-02-22 12:10:50

这是NODE_ENV的一个问题。

它不会在生产中找到gulp依赖项,所以我不得不更改package.json,将所有内容都放在“依赖项”中,而不是在"dev_dependencies“中使用一些。

票数 -1
EN

Stack Overflow用户

发布于 2017-02-18 04:14:14

首先,你不需要使用sudo。

您可以通过在终端中键入以下内容来修复错误:

代码语言:javascript
复制
npm config set prefix ~/npm

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

然后重新安装没有sudo。

希望这能有所帮助!

票数 1
EN

Stack Overflow用户

发布于 2017-02-21 10:04:07

您似乎没有在您的服务器上安装gulp。尝试使用服务器上的NodeJS和npm重新安装gulp,然后使用所需的包安装gulp,这可能会解决错误。

请检查错误,您可能会找到解决方案。

npm错误!确保安装了node.js和npm的最新版本。

在项目中安装gulp

npm安装口

全球安装gulp。

npm安装gulp -g

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42180957

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档