All Questions
761
questions
600
votes
29
answers
1.8m
views
How can I update npm on Windows?
I tried this:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
...but it didn't work.
How do I do this on Windows?
488
votes
9
answers
1.1m
views
How to completely remove node.js from Windows
I uninstalled my previous version of node.js (0.8.11) and downloaded the latest, 0.10.24 from the node.js website and installed it. However, after running node --version, it still indicates that I'm ...
270
votes
50
answers
596k
views
npm ERR! Error: EPERM: operation not permitted, rename
When I execute npm install I get this error
npm ERR! Error: EPERM: operation not permitted, rename C:\projects******\node_modules\react-async-script' -> 'C:\projects*******\node_modules.react-...
268
votes
26
answers
518k
views
Running Python on Windows for Node.js dependencies
I am getting into a Node.js codebase which requires that I download a few dependencies via NPM, namely jQuery.
In attempting to run npm install jquery, I keep getting this error:
Your environment ...
266
votes
21
answers
370k
views
Nodejs cannot find installed module on Windows
I am learning nodejs at the moment on Windows. Several modules are installed globally with npm.cmd, and nodejs failed to find the installed modules. Take jade for example,
npm install jade -g
Jade ...
261
votes
46
answers
491k
views
NPM stuck giving the same error EISDIR: Illegal operation on a directory, read at error (native)
I am stuck with this error no matter what directory I am in, and what I type after "npm" in cmd.exe. Here is the npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\...
190
votes
13
answers
333k
views
How can I run a command with administrator rights with Visual Studio code terminal?
The new version 1.2.0 includes a terminal, but when I try to install any pack with Node.js, I get the "npm ERR! code EPERM" that I usually solve by right-clicking and running it as ...
168
votes
46
answers
427k
views
NPM: npm-cli.js not found when running npm
Usually I can install a library using npm but today when installing yeoman I encountered this errors. Please help to figure out what's root cause.
D:\Works\phonegap\ionic\todo>npm install -g yo
...
157
votes
5
answers
175k
views
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents
I'm trying to run this project.
After updating minimatch version to 3.10.9, I'm getting the following error:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\webpack\...
154
votes
7
answers
120k
views
How to set shell for npm run-scripts in Windows
I'm running npm on Windows and would like to use & style parallel operations in run-scripts
but running in parallel in cmd is kind of messy
in my package.json file I'd like to write-
scripts: { ...
153
votes
7
answers
288k
views
Global npm install location on windows?
I'm not 100% sure, but I believe I installed node v5 from the windows installer on both my home and office PCs.
On my home PC global installs happen under %APPDATA%:
(dev) go|c:\srv> which lessc
...
122
votes
7
answers
85k
views
npm windows install globally results in npm ERR! extraneous
I am trying some "cookbook-examples" on the site 'http://tech.pro/tutorial/1190/package-managers-an-introductory-guide-for-the-uninitiated-front-end-developer#front_end_developers'.
You ...
119
votes
17
answers
102k
views
'npm install' extremely slow on Windows
For me is npm install extremely slow. I'm using Windows 8.1 with the latest npm version. My connection speed is around 100Mbit/s.
The project I'm trying to install has around 20 packages/dependencies ...
116
votes
12
answers
211k
views
How to install NodeJS LTS on Windows as a local user (without admin rights)
I'm using Windows as a simple user (I don't have any admin rights) and want to install NodeJS LTS.
On the download site I have the choice to download only the binary node.exe (which don't includes ...
114
votes
18
answers
151k
views
create-react-app: How do I "npm start" with a specific browser?
npm start
starts the react server on the default browser, which is Firefox for me. I like Firefox for browsing but prefer Chrome in web development for its developer tools. Is there a way to force "...
112
votes
10
answers
181k
views
How to use npm with node.exe?
I have downloaded Windows Binary (.exe) of nodejs from the main page.
How can I install and use npm (Node package manager)?
108
votes
32
answers
226k
views
Npm Please try using this command again as root/administrator
I've been desperately trying to install modules using node.js but it always fails getting packages with npm.
I logged in as Administrator and used powershell/cmd with "run as administrator". I also ...
91
votes
8
answers
28k
views
How to deploy Node.js application with deep node_modules structure on Windows?
I've run into a curious issue - apparently some Node.js module have so deep folder hierarchies that Windows copy command (or PowerShell's Copy-Item which is what we're actually using) hits the ...
91
votes
9
answers
51k
views
Node npm windows file paths are too long to install packages
Situation
I want to use gulp and related front-end tool chains in Windows-hosted development environments. I'm hitting a wall trying to use gulp plug-ins like Browser-Sync, because the node_modules ...
86
votes
13
answers
90k
views
How do I update npm on Windows?
When I install node 0.10.33 from the msi ( http://nodejs.org/download/ ), I get an old version of npm (1.4.28). How can I upgrade npm on Windows?
npm install -g npm
does not work; I still have the ...
77
votes
14
answers
65k
views
After installing npm on WSL Ubuntu 20.04 I get the message "/usr/bin/env: ‘bash\r’: No such file or directory"
I see the following message when running the npm install or npm command from the terminal. Executing node works as expected.
> npm install
/usr/bin/env: ‘bash\r’: No such file or directory
76
votes
10
answers
271k
views
Installing Node.js (and npm) on Windows 10
I had some issues trying to install Node on Windows 10 and found the solution.
The error was as follows:
C:\Users\Stephan>npm
Error: ENOENT, stat 'C:\Users\Stephan\AppData\Roaming\npm'
The ...
76
votes
28
answers
200k
views
npm install with error: `gyp` failed with exit code: 1
I'm try to install modules on Windows 10 using npm 5.6.0. When I enter npm install I get:
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess....
76
votes
8
answers
212k
views
nodejs npm global config missing on windows
I can't find at all where npm has its global settings stored.
npm config get userconfig
C:\Users\Jack\.npmrc
npm config get globalconfig
C:\Users\Jack\AppData\Roaming\npm\etc\npmrc
There's no ...
72
votes
10
answers
43k
views
Updating npm when using nvm-windows
I'm using nvm-windows version 1.1.7.
I just installed node 11.9.0.
nvm installs npm version 6.5.0 together with this node version.
However, there's npm version 6.7.0 available already.
When I now ...
67
votes
3
answers
53k
views
How can I update npm itself?
I am trying to update npm itself:
npm uninstall npm -g
Responds with:
unbuild [email protected]
But when I go:
npm --version
I get 1.4.28? How to upgrade the npm itself?
63
votes
8
answers
67k
views
Global NPM package installed but command not found
I have globally installed two npm packages "download" and "enigmavirtualbox" via command line:
npm install -g download and
npm install -g engimavirtualbox
I'm trying to use them in a batch file to ...
48
votes
3
answers
38k
views
NPM package 'bin' script for Windows
Cucumber.js is supplying a command-line "binary" which is a simple .js file containing a shebang instruction:
#!/usr/bin/env node
var Cucumber = require('../lib/cucumber');
// ...
The binary is ...
47
votes
10
answers
167k
views
git is not installed or not in the PATH
Windows, when I try to run npm install, it shows:
[email protected] postinstall E:\mean
node node_modules/grunt-cli/bin/grunt install
Running "bower:install" (bower) task
Fatal error : git is not installed ...
46
votes
27
answers
155k
views
ETIMEDOUT Error while installing Node packages on Windows
I am trying to install node packages on my windows machine using npm from a fresh install of node.
however, I am getting ETIMEDOUT errors. I checked few other stackoverflow questions with similar ...
43
votes
19
answers
215k
views
Error : getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
I am working on a corporate network.
Trying to install npm. But I'm getting this error again and again.
$ npm install
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe"...
43
votes
8
answers
87k
views
Cannot npm install due to node-gyp: binding.gyp not found
I have been working on this all day and have tried lots of different things:
Uninstalling node and installing latest version
Using the --msvs_version= flag set to 2010, 2011, 2012, 2013, 2015
...
36
votes
5
answers
55k
views
Configure node npm package.json so that "npm test" works on both unix and windows
I have developed a node.js npm module, developing under Windows. Today I wrote some Mocha tests. After many struggles, it seemed that for npm test to work, package.json had to look like this: (...
35
votes
9
answers
75k
views
Unable to run lerna's command
I am trying to install lerna using npm , packages are successfully added but when I run any command of lerna it comes out as.
bash: lerna: command not found
Node Version : v8.10.0
Npm Version : ...
35
votes
12
answers
60k
views
Not seeing latest version when updating Node.js via installer (MSI) Windows 7
I'm trying to update node on my Windows 7 box but I'm not seeing the latest version after I re-install/update node.
I'm just going out to http://nodejs.org/download/ and getting the latest Windows ...
34
votes
11
answers
80k
views
npm - The system cannot find the path specified
I have installed nodejs. When I try and use npm via power shell or cmd it returns
The system cannot find the path specified.
If I run node -v everything works fine. I can use npm via the nodejs ...
33
votes
19
answers
271k
views
The term 'node' is not recognized... In Powershell
I have been trying to resolve this issue for the whole day.
When I run node -v or npm install in cmd prompt, it works absolutely fine. But when I run the same commands in Powershell, it gives the ...
31
votes
2
answers
45k
views
Is it safe to remove npm-cache folder in windows?
npm cache clean -f is not able to clear the npm_cache folder located at the path C:\Users\jerry\AppData\Roaming\npm-cache. Though it clears some of the files in this folder.
Output of command: npm ...
30
votes
12
answers
83k
views
What is the (ERR! code ENOLOCAL npm ERR!) Could not install because of an error?
I am going to update npm latest version, but it's showing this error message:
G:\>npm i -g npm ERR! code ENOLOCAL npm ERR!
Could not install from "" as it does not contain a package.json ...
29
votes
3
answers
16k
views
git is blocked, how to install npm modules
We are connected through a proxy and here, git is blocked ( not the website but on git//: ) we tried with egit, "git on windows", with and without proxy but not a single clone to local happened.
Now ...
29
votes
13
answers
96k
views
npm error on every command: EEXIST: file already exists, mkdir 'c:\users\user\appdata\Roaming\npm'
I'm just new to node and npm and this is frustrating.
Well it's almost all said in the title.
On a Windows 10 x64 using a NON elevated prompt, all npm commands shows:
EEXIST: file already exists, ...
29
votes
3
answers
33k
views
npm global install does not add packages to PATH on Windows 8.1
When I run npm install -g <package> it installs the packages in my user/AppData/Roaming/npm/npm_modules/ folder. This sub-folder is not in my PATH so if I try to run the package without ...
28
votes
10
answers
38k
views
unknown error on npm install "npm ERR! Unexpected token '.'" on using NVM-Windows, Node v17, NPM v8
This seems to be a semi-common error, but it's unclear to me what is causing it. I want to know what is causing this error and how can I resolve it.
Using NVM I have installed Node @latest (Version 17....
28
votes
6
answers
18k
views
super slow node npm commands
I have node v.4.4 with npm v.2.14.20 (default bundled with windows installer). My OS: Windows 7 64bit. Hardware: Dell laptop, 16GB RAM, SSD, core i7.
I'm facing a problem with extremely slow npm. For ...
26
votes
5
answers
11k
views
No console colors if using npm script inside a Git bash (mintty)
Introduction
Using chalk I have written a small console program for printing colored text, which I execute with NodeJS:
console.log(require('chalk').yellow('yellow text'));
The program prints the ...
26
votes
4
answers
21k
views
npm package.json bin won't work on Windows
I am trying to start my cli tool via the package.json bin property.
I have the following:
...
"name": "mycli",
"bin": "./bin/mycli",
...
When I open the cmd in the package path and type: "mycli" it ...
26
votes
2
answers
58k
views
How to install NodeJS project locally without internet connection?
I have a project which I will have to deploy to client Windows systems where it will not be possible to connect to internet. I currently have a folder in D:\NODE which contains node.exe and npm.cmd ...
22
votes
17
answers
41k
views
listen EACCES: permission denied in windows
Everything was worked fine before today evening after i uninstalled vscode and installed again I'm facing this issue while try to run npm run app i have no clue how to fix this i tried to run vs code ...
19
votes
1
answer
6k
views
Error: Illegal characters in path in npm rimraf
I am getting an error while I tried to delete multiple directories using npm rimraf.
Error: Illegal characters in path
Command I run is rimraf **/lib/**
> [email protected] clean-libs
> ...
17
votes
14
answers
14k
views
Install electron on node for windows hangs
I am following the quick installtion guide on electron :http://electron.atom.io/
Script:
Clone the Quick Start repository
git clone https://github.com/electron/electron-quick-start
Go into the ...