Using npm run script to start dev: "dev": "NODE_PATH=\"$(pwd)\" nodemon -r babel-register -r babel-polyfill src/index.js",
When an error occurs in node (my code is wrong) the following id displayed:
npm ERR! Linux 4.4.0-45-generic
npm ERR! argv "/home/karlm/.nvm/versions/node/v7.2.0/bin/node" "/home/karlm/.nvm/versions/node/v7.2.0/bin/npm" "run" "start" "--" "--config" "configs/config.json"
npm ERR! node v7.2.0
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! proj#1.1.1 start: `NODE_PATH="$(pwd)" node -r babel-register -r babel-polyfill src/index.js "--config" "configs/config.json"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the proj#1.1.1 start script 'NODE_PATH="$(pwd)" node -r babel-register -r babel-polyfill src/index.js "--config" "configs/config.json"'.
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 avhs-frontdoor package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! NODE_PATH="$(pwd)" node -r babel-register -r babel-polyfill src/index.js "--config" "configs/config.json"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs proj
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls proj
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/karl/dev/node/proj/npm-debug.log
npm-debug.log gives nothing. This is quite irritating. Is there anyway for npm to pipe the actual node error out into the console?
Related
I'm with Centos7, installed on VirtualBox (true OS: Windows 7).
Node version: 6.10.3
Npm version: 3.10.10
I installed vue-cli, like this:
sudo npm install -g vue-cli
Then I created a new vue project, like this:
sudo vue init webpack-simple mynewproject
But I get an error when running "npm run dev":
> mynewproject#1.0.0 dev /var/www/html/mynewproject
> cross-env NODE_ENV=development webpack-dev-server --open --hot
sh: cross-env : commande introuvable
npm ERR! Linux 3.10.0-514.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "dev"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! vuetest#1.0.0 dev: `cross-env NODE_ENV=development webpack-dev-server --open --hot`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the mynewproject#1.0.0 dev script 'cross-env NODE_ENV=development webpack-dev-server --open --hot'.
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 vuetest package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cross-env NODE_ENV=development webpack-dev-server --open --hot
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs vuetest
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls vuetest
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /var/www/html/mynewproject/npm-debug.log
Does anyone know how to fix it?
You need to cd to your project directory and run:
npm install
You can find the instructions on the webpack-simple github repo
I am using react-boilerplate (https://www.github.com/react-boilerplate) to create a small app. While running the build command (npm run build) for my app, I see the following warning:
WARNING in asset size limit:
The following asset(s) exceed the recommended size limit (250 kB)
This can impact web performance.
Assets:
0.a4edf518ed555866f5cd.chunk.js (286 kB)
And the following errors:
ERROR in 0.a4edf518ed555866f5cd.chunk.js from UglifyJs
Unexpected token name «i», expected punc «;»
[0.a4edf518ed555866f5cd.chunk.js:8982,11]
And:
npm ERR! Linux 3.19.0-80-generic
npm ERR! argv "/home/ahsan/.nvm/versions/node/v6.9.4/bin/node" "/home/ahsan/.nvm/versions/node/v6.9.4/bin/npm" "run" "build"
npm ERR! node v6.9.4
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! react-boilerplate#3.4.0 build: cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the react-boilerplate#3.4.0 build script 'cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress'.
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 react-boilerplate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs react-boilerplate
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls react-boilerplate
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/ahsan/Desktop/i2x/npm-debug.log`
I can't figure out what this problem might be, need help solving this problem.
Execute the command npm run build:prod
I do not know if the error is in the port, or in one of the files.
npm ERR! Linux 2.6.32-642.6.2.el6.x86_64
npm ERR! argv "/root/.nvm/versions/node/v6.9.4/bin/node" "/root/.nvm/versions/node/v6.9.4/bin/npm" "run" "build:prod"
npm ERR! node v6.9.4
npm ERR! npm v4.1.1
npm ERR! code ELIFECYCLE
npm ERR! venfi#3.3.0 build:prod: `webpack --config config/webpack.prod.js --progress --profile --bail`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the venfi#3.3.0 build:prod script 'webpack --config config/webpack.prod.js --progress --profile --bail'.
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 venfi package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack --config config/webpack.prod.js --progress --profile --bail
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs venfi
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls venfi
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /var/www/clients/client6/web5/web/venfi/npm-debug.log
I have tried for many days, what can I do?
Thank you,
I am new be to node js . started to set up node js project .
Got error when npm start command is used.
npm start
> sigma#1.1.0 start /usr/local/UserProfile/TitanUI
> http-server -p 8080
sh: http-server: command not found
npm ERR! Linux 2.6.32-504.8.1.el6.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v6.7.0
npm ERR! npm v3.10.3
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! sigma#1.1.0 start: `http-server -p 8080`
npm ERR! spawn ENOENT
npm ERR! Failed at the sigma#1.1.0 start script 'http-server -p 8080'.
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 sigma package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! http-server -p 8080
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs sigma
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls sigma
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/UserProfile/TitanUI/npm-debug.log
These are the versions of centos , npm and node js.
centos:6.6
npm:3.10
nodejs:6.7.0
I guess I have latest versions only..Please help me if any one knows about this.
Removed the node modules folder and ran "npm install" and "npm start" again. This solved the above error. Thanks!
I'm getting an error when trying to run a node.js app in elastic beanstalk. I followed the instructions here for an express app, but when I inspect the node.js logs, I can see the node process exits with a permissions error. I'm not sure what to do here?
> express-test#0.0.1-52 start /var/app/current
> src/server.js
sh: src/server.js: Permission denied
npm ERR! express-test#0.0.1-52 start: `src/server.js`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the express-test#0.0.1-52 start script.
npm ERR! This is most likely a problem with the express-test package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! src/server.js
npm ERR! You can get their info via:
npm ERR! npm owner ls express-test
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.10.35-43.137.amzn1.x86_64
npm ERR! command "/opt/elasticbeanstalk/node-install/node-v0.10.26-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v0.10.26-linux-x64/bin/npm" "start"
npm ERR! cwd /var/app/current
npm ERR! node -v v0.10.26
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/app/current/npm-debug.log
npm ERR! not ok code 0
What do you have in your package.json file in the scripts section?
I'm guessing you forgot to put the beginning part of the command and instead it is trying to execute server.js, which is a js file and isn't executable.
Instead, try:
"scripts": {
"start": "node server.js"
},