App Engine Deployment Generates Error Using gulp?

What I wrote in the terminal for deployment, as usual:

gcloud app deploy 

The error I am getting is:

 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 

Using Mean.js: https://github.com/meanjs/mean

Cannot find npm debug log.


PS: I installed gulp globally with

 $ sudo npm install gulp-cli -g 
+5
source share
3 answers

This is a problem with NODE_ENV.

He would not find a gulp dependency in production, so I had to change my package.json package and put everything in a "dependency" instead of using some in "dev_dependencies".

-1
source

First off, you do not need to use sudo.

You can fix your mistake by entering it in the terminal:

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

Then reinstall without sudo.

Hope this helps!

+1
source

It seems that you have not installed gulp on your server. Try reinstalling gulp on your server using NodeJS and npm on your server, and then install gulp with the necessary packages so that it can resolve the error.

Please review the error information you may find.

npm ERR! Make sure you have the latest version of node.js installed and npm is installed.

Install gulp in your project

npm install gulp

Install gulp globally.

npm install gulp -g

0
source

Source: https://habr.com/ru/post/1264108/


All Articles