I have not had this issue before installing other modules, but all of a sudden I can't install anything. I am trying to install robotjs currently, so that will be my example.
C:(username)>npm install robotjs
npm ERR! code EINVALIDPACKAGENAME
npm ERR! Invalid package name "Google Chrome.lnk": name can only contain URL-friendly characters
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Aeridath\AppData\Roaming\npm-cache_logs\2023-01-20T20_02_14_111Z-debug.log
I have tried
npm install --production windows-build-tools
npm install node-gyp
npm install robotjs
as suggested in previous posts to no avail.
If I add -g, it installs, but does not work with my code.
v12.22.3
Win10 x64
I also get this when doing npm list:
(otherstuff)
| +-- color-convert#1.2.2
| +-- firmata#2.2.0
| +-- lodash.clonedeep#4.5.0
| +-- lodash.debounce#4.0.8
| +-- nanotimer#0.3.10
| +-- serialport#8.0.7
| `-- temporal#0.7.1
`-- keypress#0.2.1
npm ERR! extraneous: readable-stream#2.3.7 C:\Aeridath\node_modules\bl\node_modules\readable-stream
npm ERR! extraneous: readable-stream#2.3.7 C:\Aeridath\node_modules\tar-stream\node_modules\readable- stream
npm ERR! extraneous: xtend#4.0.2 C:\Aeridath\node_modules\tar-stream\node_modules\xtend
npm ERR! extraneous: color-convert#1.9.3 C:\Aeridath\node_modules\ansi-styles\node_modules\color-convert
npm ERR! extraneous: debug#4.1.1 C:\Aeridath\node_modules\#serialport\binding-abstract\node_modules\debug
npm ERR! extraneous: debug#4.1.1 C:\Aeridath\node_modules\#serialport\binding-mock\node_modules\debug
npm ERR! extraneous: debug#4.1.1 C:\Aeridath\node_modules\#serialport\bindings\node_modules\debug
npm ERR! extraneous: readable-stream#2.3.7 C:\Aeridath\node_modules\are-we-there-yet\node_modules\readable-stream
npm ERR! extraneous: pump#3.0.0 C:\Aeridath\node_modules\prebuild-install\node_modules\pump
npm ERR! extraneous: tar-fs#2.0.1 C:\Aeridath\node_modules\prebuild-install\node_modules\tar-fs
npm ERR! extraneous: debug#4.1.1 C:\Aeridath\node_modules\#serialport\stream\node_modules\debug
npm ERR! extraneous: debug#4.1.1 C:\Aeridath\node_modules\serialport\node_modules\debug
Related
I try to install Spectron, by using this command:
npm install --save-dev spectron
but I get this Err msg:
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" "install" "--save-dev" "spectron"
npm ERR! node v6.9.2 npm ERR! npm v3.10.9 npm ERR! code ENOSELF
npm ERR! Refusing to install spectron as a dependency of itself npm
ERR! npm ERR! If you need help, you may report this error at: npm ERR!
https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! C:\spectron-master\npm-debug.log
What i'm doing wrong?
If you don't set any name in the package.json by default the folder name is taken.
You can't install a Package which is same like the name in package.json.
example : trying to install Spectron in a project having the name Spectron in package.json is supposed to raise this error.
I try to install all dependencies in the project Ive cloned from repo but it fails on node-sass. I use OS Ubuntu 14.04.
This is an error log Ive received:
(
node) child_process: options.customFds option is deprecated. Use options.stdio instead.
make: Entering directory `/home/maras/Documents/eCodile/debtorcare/client/node_modules/gulp-sass/node_modules/node-sass/build'
CXX(target) Release/obj.target/binding/binding.o
In file included from ../binding.cpp:7:0:
../sass_context_wrapper.h:10:3: error: ‘uv_work_t’ does not name a type
uv_work_t request;
^
../sass_context_wrapper.h:20:3: error: ‘uv_work_t’ does not name a type
uv_work_t request;
^
../binding.cpp:13:20: error: variable or field ‘WorkOnContext’ declared void
void WorkOnContext(uv_work_t* req) {
^
../binding.cpp:13:20: error: ‘uv_work_t’ was not declared in this scope
../binding.cpp:13:31: error: ‘req’ was not declared in this scope
void WorkOnContext(uv_work_t* req) {
^
../binding.cpp:19:22: error: variable or field ‘MakeOldCallback’ declared void
void MakeOldCallback(uv_work_t* req) {
^
../binding.cpp:19:22: error: ‘uv_work_t’ was not declared in this scope
../binding.cpp:19:33: error: ‘req’ was not declared in this scope
void MakeOldCallback(uv_work_t* req) {
^
make: *** [Release/obj.target/binding/binding.o] Error 1
make: Leaving directory `/home/maras/Documents/eCodile/debtorcare/client/node_modules/gulp-sass/node_modules/node-sass/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/maras/.nvm/versions/node/v5.5.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.19.0-58-generic
gyp ERR! command "/home/maras/.nvm/versions/node/v5.5.0/bin/node" "/home/maras/.nvm/versions/node/v5.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/maras/Documents/eCodile/debtorcare/client/node_modules/gulp-sass/node_modules/node-sass
gyp ERR! node -v v5.5.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
Build failed
Debtorcare#0.0.0 /home/maras/Documents/eCodile/debtorcare/client
├─┬ gulp-jade#0.3.0
│ └─┬ event-stream#3.0.20
│ ├── map-stream#0.0.6
│ └── split#0.2.10
└─┬ gulp-uglify#0.1.0
├── clone#0.1.19
└─┬ event-stream#3.0.20
├── map-stream#0.0.6
└── split#0.2.10
npm WARN EPACKAGEJSON Debtorcare#0.0.0 No description
npm WARN EPACKAGEJSON Debtorcare#0.0.0 No repository field.
npm WARN EPACKAGEJSON Debtorcare#0.0.0 No license field.
npm ERR! Linux 3.19.0-58-generic
npm ERR! argv "/home/maras/.nvm/versions/node/v5.5.0/bin/node" "/home/maras/.nvm/versions/node/v5.5.0/bin/npm" "install"
npm ERR! node v5.5.0
npm ERR! npm v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! node-sass#0.7.0 install: `node build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#0.7.0 install script 'node build.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 node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/maras/Documents/eCodile/debtorcare/client/npm-debug.log
I tried to remove .node_modules file , restart etc but It didnt work. Has anyone any ideas what could be wrong here?
Try using the following command to install node sass .
sudo npm install --unsafe-perm node-sass
I am into the same error and along, I am maintaining multiple versions node using NVM, I resolved this using the following commands,
Clear the cache, using the following command,
npm cache clear --force
Install node-sass dependencies using,
npm install --save-dev node-sass --unsafe-perm
Rebuilds node-sass but only if needed,
npm rebuild node-sass --unsafe-perm
Then, I could make my build successful. Hope this helps.
I'm getting an error when trying to run:
$babel-node ./server.js
The CLI has been moved into the package babel-cli.
$ npm install -g babel-cli
When I install it and run it again it asks again for it.
Anyone came across this situation? Can't seem to move forward.
>
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start"
npm ERR! node v5.1.0
npm ERR! npm v3.5.0
npm ERR! code ELIFECYCLE
npm ERR! relay-starter-kit#0.1.0 start: `babel-node ./server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the relay-starter-kit#0.1.0 start script 'babel-node ./server.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 relay-starter-kit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! babel-node ./server.js
npm ERR! You can get their info via:
npm ERR! npm owner ls relay-starter-kit
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/diogo/Projects/cf-ophite/npm-debug.log
Babel Version 6 split some packages.
Did you try to open a new terminal window after
npm install -g babel-cli ?
You can also install version 5 and work as before:
npm install -g babel#5
If this happens after upgrading node, try npm rebuild in your project directory
Another solution is to delete the node_modules folder, and execute npm install again
I downloaded AngularJS phonecat standard app, and installed Node. But when I move to directory with code and try 'npm start' I get the following error:
> angular-phonecat#0.0.0 start /Users/marya/JS:HTML:CSS/angular-phonecat
> http-server -a 0.0.0.0 -p 8000
sh: http-server: command not found
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/Cellar/nvm/0.17.2/v0.10.32/bin/npm" "start"
npm ERR! node v0.10.32
npm ERR! npm v2.1.4
npm ERR! code ELIFECYCLE
npm ERR! angular-phonecat#0.0.0 start: `http-server -a 0.0.0.0 -p 8000`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the angular-phonecat#0.0.0 start script.
npm ERR! This is most likely a problem with the angular-phonecat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! http-server -a 0.0.0.0 -p 8000
npm ERR! You can get their info via:
npm ERR! npm owner ls angular-phonecat
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/marya/JS:HTML:CSS/angular-phonecat/npm-debug.log
What does it mean? How can I fix it? Thanks in advance.
Well it does seem like you haven't installed the http-server package.
Try the line below. It should work if it is included in your package.json
$ npm install
otherwise try:
$ npm install http-server
I could install gruntjs locally using npm install grunt.
But when I'm trying to install it globally npm install grunt -g, i'm getting an error:
npm ERR! Error: EACCES, symlink '../lib/node_modules/grunt/bin/grunt'
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR!
npm ERR! System Linux 2.6.18-92.el5xen
npm ERR! command "nodejs" "/usr/bin/npm" "install" "grunt" "-g"
npm ERR! cwd /home/lj
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.19
npm ERR! path ../lib/node_modules/grunt/bin/grunt
npm ERR! code EACCES
npm ERR! message EACCES, symlink '../lib/node_modules/grunt/bin/grunt'
npm ERR! errno {}
npm ERR! Error: EACCES, open 'npm-debug.log'
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR!
npm ERR! System Linux 2.6.18-92.el5xen
npm ERR! command "nodejs" "/usr/bin/npm" "install" "grunt" "-g"
npm ERR! cwd /home/lj
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.19
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! message EACCES, open 'npm-debug.log'
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/lj/npm-debug.log
npm not ok
With sudo I have error too:
npm ERR! Error: spawn ENOENT
npm ERR! at errnoException (child_process.js:483:11)
npm ERR! at ChildProcess.spawn (child_process.js:446:11)
npm ERR! at child_process.js:342:9
npm ERR! at Object.execFile (child_process.js:252:15)
npm ERR! at uidNumber (/usr/lib/nodejs/uid-number/uid-number.js:33:17)
npm ERR! at loadUid (/usr/lib/nodejs/npm/lib/npm.js:336:5)
npm ERR! at Array.2 (/usr/lib/nodejs/bind-actor.js:15:8)
npm ERR! at LOOP (/usr/lib/nodejs/chain.js:15:13)
npm ERR! at /usr/lib/nodejs/chain.js:18:7
npm ERR! at setUser (/usr/lib/nodejs/npm/lib/npm.js:346:32)
npm ERR! You may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR!
npm ERR! System Linux 2.6.18-92.el5xen
npm ERR! command "nodejs" "/usr/bin/npm" "install" "grunt" "-g"
npm ERR! cwd /home/lj
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.19
npm ERR! syscall spawn
npm ERR! code ENOENT
npm ERR! message spawn ENOENT
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/lj/npm-debug.log
npm not ok
What could I do to install it?
P.S. It's possible that come rights for some folders is for root:root, not for my user. Cuz our admins installed VM that way...
I've had this problem too with grunt and bower
The solution I've found is in this article NPM config
In your .npmrc you need to set the prefix path
prefix = /usr/local
or you can do it from terminal like this:
npm config set prefix "/usr/local"
This way node will know where to install them:
In npm 1.0, there are two ways to install things:
globally —- This drops modules in {prefix}/lib/node_modules, and puts executable files in {prefix}/bin, where {prefix} is usually something like /usr/local. It also installs man pages in {prefix}/share/man, if they’re supplied.
locally —- This installs your package in the current working directory. Node modules go in ./node_modules, executables go in ./node_modules/.bin/, and man pages aren’t installed at all.
Try chowning the node_modules folder and then try to install again:
sudo chown -R $USER /path/to/node_modules/folder
Encountered same issue. The following works for me:
sudo npm install -g grunt-cli
try sudo npm install -g grunt ?
Adding the option --no-bin-links works good. I tried everything and only this solved my problem. I was installing the Yeoman on ubuntu 12.04 and it was always returning the error:
npm ERR! Error: EACCES, symlink '../lib/node_modules/yo/cli.js'
Then, I did:
npm install -g --no-bin-links yo
=D
For more details https://github.com/isaacs/npm/issues/2380