Questions tagged [npm-install]

npm install is a command in the npm CLI that searches for and installs a specified package from an npm repository.

is a package manager for .

npm install <packagename> is a command in the npm CLI that searches for and installs a specified package from an npm repository. In addition, it will install any packages that the specified package depends on.

Reference:

5374 questions
229
votes
4 answers

What is the difference between npm install and npm run build?

What is the difference between npm install and npm run build? I have noticed in my project that sometimes npm starts failing when npm install is performed, but, upon running npm run build, it works just fine. How do the inner workings of these two…
BalajiK
  • 2,471
  • 2
  • 13
  • 12
217
votes
4 answers

npm: When to use `--force` and `--legacy-peer-deps`

I'm trying to understand how recreating the node_modules directory for deployment works. We're using npm ci instead of npm install to ensure a clean slate during deployment. However, when we run it without any flags, we get the following error: Fix…
Floating Sunfish
  • 4,920
  • 5
  • 29
  • 48
210
votes
1 answer

How to see logs from npm installation?

I am unable to install ionic through npm. Are there any logs that I can check to see what's wrong and if yes, where are they located? What I see is the waiting stick dancing forever. I've waited for an hour or so but nothing changes.
papakias
  • 2,925
  • 3
  • 13
  • 20
208
votes
47 answers

npm - EPERM: operation not permitted on Windows

I ran npm config set prefix /usr/local After running that command, When trying to run any npm commands on Windows OS I keep getting the below. Error: EPERM: operation not permitted, mkdir 'C:\Program Files (x86)\Git\local' at Error (native) Have…
Lahar Shah
  • 7,032
  • 4
  • 31
  • 39
203
votes
3 answers

What do the --save flags do with npm install

I see instructions to install a package with either npm install or npm install --save or npm install --save-dev What is the difference between these options?
Obromios
  • 15,408
  • 15
  • 72
  • 127
184
votes
10 answers

Why did package-lock.json change the integrity hash from sha1 to sha512?

I just generated a new npm lockfile, package-lock.json, as part of my typical workflow. But I noticed that this time all of the integrity hashes have been changed from sha1 to sha512. What is happening here? "chalk": { "version": "2.0.1", …
Matt
  • 33,328
  • 25
  • 83
  • 97
183
votes
6 answers

npm install and build of forked github repo

I'm using a module for my angular app called angular-translate. However, I've had to make a few small modifications to the source code to get everything working the way I'd like, and now I want to persist those changes on npm install. A colleague…
hughesjmh
  • 2,133
  • 2
  • 11
  • 11
179
votes
21 answers

How to solve npm install throwing fsevents warning on non-MAC OS?

Following warning is being thrown on npm install command - npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\rea ct-scripts\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for…
Sandeepan Nath
  • 9,966
  • 17
  • 86
  • 144
163
votes
7 answers

How to install only "devDependencies" using npm

I am trying to install ONLY the "devDependencies" listed in my package.json file. But none of the following commands work as I expect. All of the following commands install the production dependencies also which I do not want. npm install --dev npm…
Nesan Rajendran
  • 1,653
  • 2
  • 12
  • 7
162
votes
11 answers

How to fix 'fs: re-evaluating native module sources is not supported' - graceful-fs

Recently I've made a switch to Node v.6, and It started creating more and more problems with running normal builds grunt/gulp/webpack For example: $ gulp [14:02:20] Local gulp not found in ~/_Other/angular-2-ts/angular2-seed [14:02:20] Try running:…
shershen
  • 9,875
  • 11
  • 39
  • 60
153
votes
18 answers

npm install error - unable to get local issuer certificate

I am getting an unable to get local issuer certificate error when performing an npm install: typings ERR! message Unable to read typings for "es6-shim". You should check the entry paths in "es6-shim.d.ts" are up to date typings ERR! caused by…
mindparse
  • 6,115
  • 27
  • 90
  • 191
141
votes
42 answers

create-react-app is not working since version 4.0.1

I tried installing create-react-app using npm i create-react-app, npx create-react-app new-app and npm init react-app new-app, but I keep getting this error message: You are running create-react-app 4.0.0, which is behind the latest release…
Sumanth Hegde
  • 1,411
  • 2
  • 7
  • 3
128
votes
1 answer

creating a .bat file with npm install command

I created the following file npminstall.bat: npm install echo hello When I run the following command from Windows 10 Command Line (dos) npminstall.bat, the npm install command fires, but the echo hello doesn't fire. I tried putting a semi-colour…
John
  • 32,403
  • 80
  • 251
  • 422
128
votes
18 answers

npm - "Can't find Python executable "python", you can set the PYTHON env variable."

I'm trying to run the following command: npm install -g bower gulp cordova ionic tsd@next karma-cli protractor node-gyp coffee-script js-beautify typescript npm-check I have installed Python, Visual Studio Express and node-gyp so thought I'd be good…
Nick
  • 3,745
  • 20
  • 56
  • 75
127
votes
17 answers

Getting "Cannot read property 'pickAlgorithm' of null" error in react native

I get an error when running npm install. The error is: npm ERR! Cannot read property 'pickAlgorithm' of null npm ERR! A complete log of this run can be found in: npm ERR! npm-cache\_logs\2021-10-14T08_03_47_266Z-debug.log I did the following…
Kiana Kazeminejad
  • 1,691
  • 3
  • 6
  • 20