- npm install error on windows 10 #1788
- Comments
- higherstar commented Jun 20, 2019 •
- rvagg commented Jun 20, 2019
- BrutalBirdie commented Jun 20, 2019
- higherstar commented Jun 20, 2019
- rvagg commented Jun 21, 2019
- Ошибки при npm install
- npm install not working in windows
- 5 Answers 5
- NodeJS — Error installing with NPM
- 14 Answers 14
- UPDATED 02/2016
- UPDATED 09/2016
- UPDATED 06/2018
- Getting error after running the command «npm install». #5542
- Comments
- shivamshukla commented Jun 24, 2014
- tjwebb commented Jun 25, 2014
- shivamshukla commented Jun 25, 2014
- jcolemorrison commented Jun 25, 2014
- tjwebb commented Jun 25, 2014
- shivamshukla commented Jun 25, 2014
- shivamshukla commented Jun 25, 2014
- shivamshukla commented Jun 25, 2014
- askumar1444 commented Jun 26, 2014
- shivamshukla commented Jun 26, 2014
npm install error on windows 10 #1788
Comments
higherstar commented Jun 20, 2019 •
Hello Everybody
I installed node 8.11.2, installed windows-build-tools, also installed Visual Studio Community 2017 including C++ Build Toos, Windows 10 SDK as well.
And then tried to install npm i.
But I am still getting these errors.
The text was updated successfully, but these errors were encountered:
rvagg commented Jun 20, 2019
The errors you’re getting say that the version of «bufferutil» you’re compiling isn’t compatible with the version of Node you’re using. You must be using quite an old version of it though because it’s been updated. Fetch a newer version and try again and those errors should go away. If bufferutil is pinned as a dependency of something else (CropSpec?) then you will need to update the version there, or if you’re not the maintainer, get the maintainer to update it.
BrutalBirdie commented Jun 20, 2019
Just to add this if someone stumbles over it.
Command cp not found, «Uhhmm I am on windows?»
Tried with the git-bash
higherstar commented Jun 20, 2019
@rvagg so you mean I need to upgrade the npm version which I am using to install dependencies?
rvagg commented Jun 21, 2019
@higherstar no, the version of «bufferutil» you are trying to build isn’t compatible, you need to update it, wherever it’s being pulled in.
Something in your project, maybe your project itself, is using «bufferutil», a package from npm, it’s too old for your version of Node. The compile is failing because the C++ in the version of bufferutil you have isn’t compatible with the version of Node you are using.
Use npm ls to figure out where «bufferutil» is coming from. The latest version is 4.0.1, that’s what you should be aiming to include: https://github.com/websockets/bufferutil, if it’s being depended upon by some other dependency of your project, you should hunt them down and ask them to upgrade.
c:\data\cropspec\node_modules\bufferutil\node_modules\nan\nan.h(263): error C2995: ‘v8::Local _NanEnsureLocal(v8::Local )’: function template has already been defined
c:\data\cropspec\node_modules\bufferutil\node_modules\nan\nan.h(473): error C2039: ‘GCEpilogueCallback’: is not a member of ‘v8::Isolate’
These kinds of errors are the indication of the mismatch. «nan.h» is a compatibility layer between addon C++ code and Node + V8, but it’s too old for your version of Node.
The alternative is to downgrade your version of Node. You’re using 8.11.2 which is already pretty old, so the version of bufferutil you’re using must be quite old. You could try going back to Node 6, but that’s not really recommended because it’s not supported anymore.
Basically, upgrade your dependencies, chase down authors of dependencies that are using old versions of addons that aren’t compiling.
Ошибки при npm install
Как разобраться в этих ошибках?
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /home/nikolay/projects/start-tpl-html5-coding/node_modules/array-initial
npm ERR! dest /home/nikolay/projects/start-tpl-html5-coding/node_modules/.array-initial.DELETE
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename ‘/home/nikolay/projects/start-tpl-html5-coding/node_modules/array-initial’ -> ‘/home/nikolay/projects/start-tpl-html5-coding/node_modules/.array-initial.DELETE’
npm ERR! [OperationalError: EACCES: permission denied, rename ‘/home/nikolay/projects/start-tpl-html5-coding/node_modules/array-initial’ -> ‘/home/nikolay/projects/start-tpl-html5-coding/node_modules/.array-initial.DELETE’] <
npm ERR! cause: [Error: EACCES: permission denied, rename ‘/home/nikolay/projects/start-tpl-html5-coding/node_modules/array-initial’ -> ‘/home/nikolay/projects/start-tpl-html5-coding/node_modules/.array-initial.DELETE’] <
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘rename’,
npm ERR! path: ‘/home/nikolay/projects/start-tpl-html5-coding/node_modules/array-initial’,
npm ERR! dest: ‘/home/nikolay/projects/start-tpl-html5-coding/node_modules/.array-initial.DELETE’
npm ERR! stack: «Error: EACCES: permission denied, rename ‘/home/nikolay/projects/start-tpl-html5-coding/node_modules/array-initial’ -> ‘/home/nikolay/projects/start-tpl-html5-coding/node_modules/.array-initial.DELETE'»,
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘rename’,
npm ERR! path: ‘/home/nikolay/projects/start-tpl-html5-coding/node_modules/array-initial’,
npm ERR! dest: ‘/home/nikolay/projects/start-tpl-html5-coding/node_modules/.array-initial.DELETE’,
npm ERR! parent: ‘start-tpl-html5-coding’
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm install not working in windows
I have no idea what is happening here. Hoping someone can help me.
This works great in my mac. But same process in Windows and npm install crashes. This is what I get.
I’ve tried everything I’ve seen in SO so far and every link Google search produced. I tried the following as suggested here:
Ran it as admin,
tried npm install -g
re-started xampp server
turned off Windows defender
checked the PATH for C:\Program Files\nodejs
Short of throwing this POS Windows threw a window, pun intended, I’ve done everything. Hail Apple!
node -v gives me a version v6.9.1
npm -v gives me a version as well 4.0.2
Which proves they are all installed fine, am I right?
5 Answers 5
After countless hours of debugging and researching, I decided to install in a different machine to see if the problem was with my Node installation. It worked.
So for everyone who may come across this, know that the possibility to uninstall node and delete NPM will be there. This is what I did. I believe it is the safest way to solve the problem and all the rest of your applications installed in your machine will still work. I credit this answer for these steps, although I had other npm and node_modules in other locations. So do a quick search for these and unless they are part of an application, make sure they are deleted as well.
Uninstall from Programs & Features with the uninstaller.
Reboot (or you probably can get away with killing all node-related processes from Task Manager).
Look for these folders and remove them (and their contents) if any still exist. Depending on the version you installed, UAC settings, and CPU architecture, these may or may not exist:
- C:\Program Files (x86)\Nodejs
- C:\Program Files\Nodejs
- C:\Users\
\AppData\Roaming\npm (or %appdata%\npm ) - C:\Users\
\AppData\Roaming\npm-cache (or %appdata%\npm-cache ) - C:\Users\
\.npmrc (and possibly check for that without the . prefix too)
Check your %PATH% environment variable to ensure no references to Nodejs or npm exist.
If it’s still not uninstalled, type where node at the command prompt and you’ll see where it resides — delete that (and probably the parent directory) too.
NodeJS — Error installing with NPM
I am installing a certain NodeJS script — Caress. But i am not unable to. I am using Windows 8.1, can anyone tell me what is the problem i am facing, and why is this installation not working. There seems to be a problem with the buffertools dependency, thats far as i can think. Dont know how maybe fix this?
If i download the build from github and place it in node-modules, nothing seems to work. when i try to start, using npm start, or during implementation either.
14 Answers 14
UPDATED 02/2016
Some npm plugins need node-gyp to be installed.
However, node-gyp has it’s own dependencies (from the github page):
UPDATED 09/2016
If you’re using Windows you can now install all node-gyp dependencies with single command (NOTE: Run As Admin in Windows PowerShell):
and then install the package
UPDATED 06/2018
Delete your $HOME/.node-gyp directory and try again.
See full documentation here: node-gyp
Make sure you have all the required software to run node-gyp :
You can configure version of Visual Studio used by node-gyp via an environment variable so you can avoid having to set the —msvs_version=2012 property every time you do an npm install.
- set GYP_MSVS_VERSION=2012 for Visual Studio 2012
- set GYP_MSVS_VERSION=2013e (the ‘e’ stands for FREE ‘express edition’)
This is still painful for Windows users of NodeJS as it assumes you have a copy of Visual Studio installed and many end users will never have this. So I’m lobbying Joyent to the encourage them to include web sockets as part of CORE node and also to possible ship a GNU gcc compiler as part of NodeJS install so we can permanently fix this problem.
Feel free to add your vote at:
I encountered the issue with the error:
Here is what I was doing and what finally worked.
Disclaimer: I am just getting my hands into Node, Angular after many years in the Java, Linux world among others.
Environment Description: Windows 8.1 64-bit; Cygwin; cygwin bash shell
Command used that led to error: npm install -g karma
Error: gyp ERR! configure error gyp ERR! stack Error: Can’t find Python executable «python», you can set the PYT HON env variable.
Discovery: ‘which python’ on bash shell clearly shows ‘/usr/bin/python’. Now that is annoying!
Solution: This is only applicable to those using the environment similar to what I have, i.e. using cygwin and bash shell. Hope it helps in other environments as well but keep in mind that your kettle of tea may look a little different than mine.
- Firstly, need to set the $PYTHON shell env variable in .bashrc using the explicit windows path to the python executable and not the unix like root path (/usr/bin) used by cygwin.
- Secondly, and this one took a lot of trial/error and here’s the gotcha! Cygwin installs python under /usr/bin (which is really a mirror of /bin on windows) with the version, i.e. (in my system) /usr/bin/python2.7.exe and then adds a link /usr/bin/python —> python2.7.exe. The problem is that gyp cannot follow this link and keeps giving the annoying error that it cannot find python even though you can find it just fine from the shell command line.
- With the above background now add the following line to your .bashrc
export PYTHON=»C:/cygwin64/bin/python2.7.exe (or whatever is the version on your system)»
- Now source your .bashrc from your home directory (on cygwin)—> ‘source .bashrc’
You should be fine now and gyp will find the python executable.
I hope this helps someone stumbling on the same or similar issue.
Getting error after running the command «npm install». #5542
Comments
shivamshukla commented Jun 24, 2014
IN npm-debug.log, last few lines before error started.
in npm console it says
The text was updated successfully, but these errors were encountered:
tjwebb commented Jun 25, 2014
Please tell us the exact command you are running.
shivamshukla commented Jun 25, 2014
here are the steps :
1-> i was following https://docs.angularjs.org/tutorial, and after running ‘npm install’ command mentioned in the doc there only i am getting the error.
Thanks in advance.
jcolemorrison commented Jun 25, 2014
I’ve had problems all night with this. What wound up fixing everything for me was just going back to npm version 1.4.9. You can install it by just downloading the node 0.10.28 installer here:
tjwebb commented Jun 25, 2014
npm ERR! Please try running this command again as root/Administrator.
Windows has a special admin console that you have to open. You don’t get admin privileges just by being logged in as admin.
shivamshukla commented Jun 25, 2014
i downloaded the node.js (V.0.10.28) and started the whole process again,which i mentioned above, still i am getting error, but this time a different error though:
18768 silly registry.get ‘keep-alive’: ‘timeout=10, max=44’,
18768 silly registry.get connection: ‘Keep-Alive’ > ]
18769 http 304 https://registry.npmjs.org/lodash
18770 silly registry.get cb [ 304,
18770 silly registry.get < date: 'Wed, 25 Jun 2014 15:22:27 GMT',
18770 silly registry.get server: ‘Apache’,
18770 silly registry.get via: ‘1.1 varnish’,
18770 silly registry.get ‘last-modified’: ‘Wed, 25 Jun 2014 15:22:27 GMT’,
18770 silly registry.get ‘cache-control’: ‘max-age=30’,
18770 silly registry.get etag: ‘»2P852BX64AAJEL3PLP95BHI7X»‘,
18770 silly registry.get ‘x-served-by’: ‘cache-syd1623-SYD’,
18770 silly registry.get ‘x-cache’: ‘HIT’,
18770 silly registry.get ‘x-cache-hits’: ‘1’,
18770 silly registry.get ‘x-timer’: ‘S1403709747.662785,VS0,VE0’,
18770 silly registry.get vary: ‘Accept’,
18770 silly registry.get ‘content-length’: ‘0’,
18770 silly registry.get ‘keep-alive’: ‘timeout=10, max=40’,
18770 silly registry.get connection: ‘Keep-Alive’ > ]
18771 verbose etag lodash from cache
18772 error Error: ENOENT, open ‘f:\Workspace\Angular_workspace\angular-phonecat\node_modules\protractor\node_modules\selenium-webdriver\lib\test\data\html5\blue.jpg’
18773 error If you need help, you may report this entire log,
18773 error including the npm and node versions, at:
18773 error http://github.com/npm/npm/issues
18774 error System Windows_NT 6.1.7601
18775 error command «c:\Program Files\nodejs\node.exe» «c:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js» «install»
18776 error cwd f:\Workspace\Angular_workspace\angular-phonecat
18777 error node -v v0.10.28
18778 error npm -v 1.4.9
18779 error path f:\Workspace\Angular_workspace\angular-phonecat\node_modules\protractor\node_modules\selenium-webdriver\lib\test\data\html5\blue.jpg
18780 error code ENOENT
18781 error errno 34
18782 verbose exit [ 34, true ]
shivamshukla commented Jun 25, 2014
i am running this all in gitbash console as a administrator.
@tjwebb :i though run ‘npm ERR’ command in windows console as administrator and got below output:
where is one of:
add-user, adduser, apihelp, author, bin, bugs, c, cache,
completion, config, ddp, dedupe, deprecate, docs, edit,
explore, faq, find, find-dupes, get, help, help-search,
home, i, info, init, install, isntall, issues, la, link,
list, ll, ln, login, ls, outdated, owner, pack, prefix,
prune, publish, r, rb, rebuild, remove, repo, restart, rm,
root, run-script, s, se, search, set, show, shrinkwrap,
star, stars, start, stop, submodule, t, tag, test, tst, un,
uninstall, unlink, unpublish, unstar, up, update, v,
version, view, whoami
npm -h quick help on
npm -l display full usage info
npm faq commonly asked questions
npm help search for help on
npm help npm involved overview
Specify configs in the ini-formatted file:
C:\Users\Shivam.npmrc
or on the command line via: npm —key value
Config info can be viewed via: npm help config
npm@1.4.9 C:\Program Files\nodejs\node_modules\npm
shivamshukla commented Jun 25, 2014
now what i did i run the command «npm cache clean» and then again run the command «npm install»
this time i got the same error which i got at the start: below i am pasting the error.
10417 verbose addRemoteTarball ‘b90bb169807285411da7ffcb8dd2598502d3b52d’ ]
10418 info retry fetch attempt 1 at 21:14:27
10419 verbose fetch to= C:\Users\Shivam\AppData\Local\Temp\npm-6360-lKq3dufg\1403711067082-0.7588745888788253\tmp.tgz
10420 http GET https://registry.npmjs.org/hawk/-/hawk-1.0.0.tgz
10421 error Error: UNKNOWN, open ‘C:\Users\Shivam\AppData\Roaming\npm-cache\json-stringify-safe\5.0.0\package\package.json’
10422 error If you need help, you may report this entire log,
10422 error including the npm and node versions, at:
10422 error http://github.com/npm/npm/issues
10423 error System Windows_NT 6.1.7601
10424 error command «c:\Program Files\nodejs\node.exe» «c:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js» «install»
10425 error cwd f:\Workspace\Angular_workspace\angular-phonecat
10426 error node -v v0.10.28
10427 error npm -v 1.4.9
10428 error path C:\Users\Shivam\AppData\Roaming\npm-cache\json-stringify-safe\5.0.0\package\package.json
10429 error code UNKNOWN
10430 error errno -1
10431 verbose exit [ -1, true ]
askumar1444 commented Jun 26, 2014
Please try change your npm-cache location and try
npm config set cache C:\Devel\nodejs\npm-cache —global
shivamshukla commented Jun 26, 2014
@askumar1444 : I tried but no luck,i remove the project and install it from start and change the npm-cache dir.
but on first run i got error again then i ran command ‘npm cache clean’ and rerun the command ‘npm install’ for the second time, this time i got the different error:
Below are the error trace
1st Run