When I run "npm install", it runs successfully and it installs all the packages in node_module folder. However when I run "npm start" command in cmd then it gives following errors.
D:\INSM-HTML-Player>npm start
insm-player#1.0.0 start D:\INSM-HTML-Player
npm run build && npm run serve | npm run watch
insm-player#1.0.0 build D:\INSM-HTML-Player
rollup -c && concat-cli -f dist/main.js -o dist/all.js && npm run compress
resolve failed: { Error: Cannot find module 'npm-watch'
at Function.Module._resolveFilename (module.js:469:15)
at Function.requireRelative.resolve (D:\INSM-HTML-Player\node_modules\requir e-relative\index.js:30:17)
at resolve (D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\seriali ze.js:25:26)
at findAndRemove (D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\s erialize.js:67:11)
at D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\serialize.js:111:13 at Array.map (native)
at loadPreset (D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\serialize.js:103:29)
at module.exports (D:\INSM-HTML-Player\node_modules\modify-babel-preset\inde x.js:97:19)
at Object.<anonymous> (D:\INSM-HTML-Player\node_modules\babel-preset-es2015-rollup\index.js:3:18)
at Module._compile (module.js:570:32) code: 'MODULE_NOT_FOUND' } npm-watch resolve failed: { Error: Cannot find module 'grunt-cli'
at Function.Module._resolveFilename (module.js:469:15)
at Function.requireRelative.resolve (D:\INSM-HTML-Player\node_modules\requir e-relative\index.js:30:17)
at resolve (D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\seriali ze.js:25: at findAndRemove (D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\s erialize.js:67:11)
at D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\serialize.js:111:13
at Array.map (native)
at loadPreset (D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\serialize.js:103:29)
at module.exports (D:\INSM-HTML-Player\node_modules\modify-babel-preset\index.js:97:19)
at Object.<anonymous> (D:\INSM-HTML-Player\node_modules\babel-preset-es2015-rollup\index.js:3:18)
at Module._compile (module.js:570:32) code: 'MODULE_NOT_FOUND' } gruntcli C:\Program Files\nodejs\node.exe D:\INSM-HTML-Player\node_modules\rollup\bin\rollup concat-cli -f string -o string
Options: -f, --files files or glob/wildcard to be matched and concatenated
[array] [required]
-o, --output the resulting file of the concatenation[string] [default: "all"]
--helpShow help [boolean]Examples: concat-cli -f *.js -o bundle.js This will concatenate all the js files in the current directory into a bundle.js Missing required argument: f
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe""C:\\ProgramFiles\\nodejs\\node_modules\\npm\\bin\\npm cli.js" "run" "build"
npm ERR! node v6.9.4
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! insm-player#1.0.0 build: `rollup -c && concat-cli -f dist/main.js o dist/all.js && npm run compress`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the insm-player#1.0.0 build script 'rollup -c && concat cli - f dist/main.js -o dist/all.js && npm run compress'.
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 insm-player package,
npm ERR! not with npm itself. npm ERR! Tell
the author that this fails on your system:
npm ERR! rollup -c &&
concat-cli -f dist/main.js -o dist/all.js && npm run c ompress npm
ERR! You can get information on how to open an issue for this project
with:
npm ERR! npm bugs insm-player npm ERR! Or if that isn't
available, you can get their info via: npm ERR! npm owner ls
insm-player
npm ERR! There is likely additional logging output
above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\INSM-HTML-Player\npm-debug.log
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\ node_modules\\npm\\bin\\npm-cli.js" "start" npm
ERR! node v6.9.4 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE
npm ERR! insm-player#1.0.0 start: `npm run build && npm run serve |
npm run watch`
npm ERR! Exit status 1 npm ERR! npm ERR! Failed
at the insm-player#1.0.0 start script 'npm run build && npm run
serve | npm run watch'.
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 insm-player package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run build && npm run serve | npm run watch
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs insm-player
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls insm-player
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\INSM-HTML-Player\npm-debug.log
You have to add the missing package npm-watch to package.json:
npm install npm-watch --save-dev
The run npm start again.
Related
I'm trying to import react, I wrote the following code:
import React from "react";
but when I write npm start in the terminal it shows me these errors:
> reactjs-basics#1.0.0 start /home/zx-coder/Downloads/reactjs-basics-master
> npm run build
> reactjs-basics#1.0.0 build /home/zx-coder/Downloads/reactjs-basics-master
> webpack -d && cp src/index.html dist/index.html && webpack-dev-server --content-base src/ --inline --hot
Hash: 2692c371e3a85309b95e Version: webpack 1.15.0 Time: 1020ms
Asset Size Chunks Chunk Names
bundle.js 166 kB 0 [emitted] main bundle.js.map 184 kB 0 [emitted] main
+ 37 hidden modules events.js:183
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 127.0.0.1:8080
at Object._errnoException (util.js:1022:11)
at _exceptionWithHostPort (util.js:1044:20)
at Server.setupListenHandle [as _listen2] (net.js:1367:14)
at listenInCluster (net.js:1408:12)
at GetAddrInfoReqWrap.doListen [as callback] (net.js:1517:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:97:10)
npm ERR! Linux 4.15.0-29-generic npm ERR! argv "/usr/bin/node"
"/usr/bin/npm" "run" "build" npm ERR! node v8.10.0 npm ERR! npm
v3.5.2 npm ERR! code ELIFECYCLE npm ERR! reactjs-basics#1.0.0 build:
`webpack -d &&cp src/index.html dist/index.html && webpack-dev-server
--content-base src/ --inline --hot` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the reactjs-basics#1.0.0 build script 'webpack -d
&& cp src/index.html dist/index.html && webpack-dev-server
--content-base src/ --inline --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 reactjs-basics package, npm ERR! not
with npm itself. npm ERR! Tell the author that this fails on your
system: npm ERR! webpack -d && cp src/index.html dist/index.html
&& webpack-dev-server --content-base src/ --inline --hot npm ERR! You
can get information on how to open an issue for this project with: npm
ERR! npm bugs reactjs-basics npm ERR! Or if that isn't available,
you can get their info via: npm ERR! npm owner ls reactjs-basics
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with anysupport request:
npm ERR!
/home/zx-coder/Downloads/reactjs-basics-master/npm-debug.log
npm ERR! Linux 4.15.0-29-generic npm ERR! argv "/usr/bin/node"
"/usr/bin/npm" "start" npm ERR! node v8.10.0 npm ERR! npm v3.5.2 npm
ERR! code ELIFECYCLE npm ERR! reactjs-basics#1.0.0 start: `npm run
build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the
reactjs-basics#1.0.0 start script 'npm run build'. 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 reactjs-basics package,
npm ERR! not with npm itself. npm ERR! Tell the author that this fails
on your system: npm ERR! npm run build npm ERR! You can get
information on how to open an issue for this project with: npm ERR!
npm bugs reactjs-basics npm ERR! Or if that isn't available, you can
get their info via: npm ERR! npm owner ls reactjs-basics npm ERR!
There is likely additional logging output above.
npm ERR! Please include the following file with anysupport request:
npm ERR!
/home/zx-coder/Downloads/reactjs-basics-master/npm-debug.log
The error is Error: listen EADDRINUSE 127.0.0.1:8080 which means there already is something that uses port 8080 on your machine, try changing the port webpack starts the dev server
solution 1: if your are beginner - just restart your PC.
solution 2: open task manager and kill all node instances.
alternatively you check if there is some other react app already running on port 8080 so you have to stop it
OR
you have to change your current app port to some other port.
I get this error while doing an npm start:
PS C:\Users\Concierge\downloads\prod\pdf2\ipfs_image_uploader> npm start
> react-box#0.1.0 start C:\Users\Concierge\downloads\prod\pdf2\ipfs_image_uploader
> node scripts/start.js
internal/modules/cjs/loader.js:582
throw err;
^
Error: Cannot find module 'dotenv'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (C:\Users\Concierge\downloads\prod\pdf2\ipfs_image_uploader\scripts\
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-box#0.1.0 start: `node scripts/start.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-box#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output ab
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Concierge\AppData\Roaming\npm-cache\_logs\2018-11-17T04_27_59_461Z-debug
PS C:\Users\Concierge\downloads\prod\pdf2\ipfs_image_uploader>
and when I run command npm install, I get this error:
> scrypt#6.0.3 preinstall /Users/user/Documents/pdfuploader/node_modules/scrypt
> node node-scrypt-preinstall.js
> scrypt#6.0.3 install /Users/user/Documents/pdfuploader/node_modules/scrypt
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "/path/to/executable/python2.7", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:406:16)
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:16)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/user/Documents/pdfuploader/node_modules/scrypt
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt#6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt#6.0.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2018-11-18T05_45_00_864Z-debug.log`
I tried to set up the pythonpath like here: https://www.tutorialspoint.com/How-to-set-your-python-path-on-Mac but it didn't help
I just sort it out by using this tutorial to insert that path /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages :
https://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/
but then again i got that error when npm run start: `users-Air:pdfuploader user$ npm run start
client#0.1.0 start /Users/user/Documents/pdfuploader
react-scripts start
Could not find a required file.
Name: index.html
Searched in: /Users/user/Documents/pdfuploader/public
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client#0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2018-11-18T06_44_50_004Z-debug.log`
Files which i am trying to npm run start:
https://github.com/damianjnc/pdfuploader
Some of the nodeJS modules are written in c++, and need to be compiled when being installed. This process requires python2 to be installed. Now, most Macs actually have python2 installed by default, but 'python' might not be on your executables path yet.
On a Mac, the python application is typically located at /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7. If there is no 'Python.framework' folder in /System/Library/Frameworks/ you will need to install python. If it is there, then simply symlink the previously mentioned python2.7 executable in /usr/bin. Also ensure that /usr/bin is present on your executable path by typing echo $PATH on your terminal.
To create a symlink run:
cd /usr/bin
sudo ln -s /path/to/original/python python
I run the command npm install.
After that running command npm run watch but giving following error in Ubuntu 16.04 terminal.
> # dev /var/www/html/lara-vue
> npm run development
> # development /var/www/html/lara-vue
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
/var/www/html/lara-vue/node_modules/laravel-mix/setup/webpack.config.js:1 (function (exports, require, module, __filename, __dirname) { let path
= require('path');
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at requireConfig (/var/www/html/lara-vue/node_modules/webpack/bin/convert-argv.js:96:18)
at /var/www/html/lara-vue/node_modules/webpack/bin/convert-argv.js:109:17
at Array.forEach (native)
npm ERR! Linux 4.8.0-58-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "development" npm ERR! node v4.2.6 npm ERR! npm v3.5.2 npm ERR! code ELIFECYCLE npm ERR! # development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress
--hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the # development script 'cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js
--progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js'. 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 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 node_modules/webpack/bin/webpack.js --progress --hide-modules
--config=node_modules/laravel-mix/setup/webpack.config.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls 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/lara-vue/npm-debug.log
npm ERR! Linux 4.8.0-58-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "dev" npm ERR! node v4.2.6 npm ERR! npm v3.5.2 npm ERR! code ELIFECYCLE npm ERR! # dev: `npm run development` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the # dev script 'npm run development'. 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 package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run development npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls 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/lara-vue/npm-debug.log
I have a issue when I try call npm start in Angular 2 project. Console show me:
$ npm start
angular-quickstart#1.0.0 prestart C:\Users\Jan\Desktop\Study\ZTW lab\Ang\myApp
npm run build
angular-quickstart#1.0.0 build C:\Users\Jan\Desktop\Study\ZTW lab\Ang\myApp
tsc -p src/
**error TS5023: Unknown compiler option 'moduleResolution'.**
**error TS5023: Unknown compiler option 'lib'.**
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.10.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! angular-quickstart#1.0.0 build: `tsc -p src/`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-quickstart#1.0.0 build script 'tsc -p src/'.
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 angular-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tsc -p src/
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular-quickstart
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Jan\Desktop\Study\ZTW lab\Ang\myApp\npm-debug.log
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.10.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! angular-quickstart#1.0.0 prestart: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-quickstart#1.0.0 prestart script 'npm run build'.
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 angular-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular-quickstart
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Jan\Desktop\Study\ZTW lab\Ang\myApp\npm-debug.log
Any idea?
It's very strange because 2 days ago everything was ok. I created a new project based on the QuickStart .
I called npm install and npm start and I was working with project. Today unluckily npm start don't work and I get this error :/ Thanks advance for help.
I'm setting up a Meanjs instance with a Yeoman generator. When I do 'sudo yo meanjs' everything works fine until it looks like it is trying to make a directory and it fails, any ideas on what is going on here?
SOLINK_MODULE(target) Release/kerberos.node: Finished
> bson#0.2.5 install /Users/xxx/Documents/mean/node_modules/connect-
mongo/node_modules/mongodb/node_modules/bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)
CXX(target) Release/obj.target/bson/ext/bson.o
SOLINK_MODULE(target) Release/bson.node
SOLINK_MODULE(target) Release/bson.node: Finished
npm ERR! Error: EACCES, mkdir '/Users/xxx/.npm/uglify-js/2.4.15'
npm ERR! { [Error: EACCES, mkdir '/Users/xxx/.npm/uglify-js/2.4.15']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/Users/xxx/.npm/uglify-js/2.4.15',
npm ERR! parent: 'grunt-contrib-uglify' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/xxx/Documents/mean
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! path /Users/xxx/.npm/uglify-js/2.4.15
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/Users/xxx/.npm/uglify-js/2.4.15'
npm ERR! not ok code 0
That is a pretty common error.
Yeoman is running the following:
bower install & npm install
Bower install succeeded, however NPM install is failing because of user permissions. Just run:
sudo npm install
The ZenCoder's answer is spot on, but if you want to permanently fix this permissions error, you can follow the tutorial at: https://docs.npmjs.com/getting-started/fixing-npm-permissions
Since you're on a Mac, you could actually avoid npm permissions errors altogether by just installing node instead via homebrew:
brew install node (this will install npm too)
Homebrew installs programs to a directory that doesn't require sudo for write, so you can npm install -g <whatever> freely without it.