Questions tagged [npm-install]
npm install <packagename> is a command in the npm CLI that searches for and installs a specified package from an npm repository.
npm-install
5,453
questions
1228
votes
24
answers
862k
views
How to install an npm package from GitHub directly
Trying to install modules from GitHub results in this error:
ENOENT error on package.json.
Easily reproduced using express:
npm install https://github.com/visionmedia/express throws error.
npm ...
1030
votes
30
answers
663k
views
xcode-select active developer directory error
Saw the following error when running an npm install which required node-gyp... but could be triggered by anything which requires xcode-select.
xcode-select: error: tool 'xcodebuild' requires Xcode, ...
952
votes
12
answers
464k
views
Why does "npm install" rewrite package-lock.json?
I just recently upgraded to npm@5. I now have a package-lock.json file with everything from package.json. I would expect that, when I run npm install that the dependency versions would be pulled ...
761
votes
9
answers
433k
views
What is the difference between "npm install" and "npm ci"?
I'm working with continuous integration and discovered the npm ci command.
I can't figure what the advantages are of using this command for my workflow.
Is it faster? Does it make the test harder,...
679
votes
11
answers
571k
views
Installing a local module using npm?
I have a downloaded module repo, I want to install it locally, not globally in another directory?
What is an easy way to do this?
571
votes
10
answers
660k
views
What does 'x packages are looking for funding' mean when running `npm install`?
I usually get "x packages are looking for funding." when running npm install on a react project. Any idea what that means?
534
votes
9
answers
620k
views
What does npm install --legacy-peer-deps do exactly? When is it recommended / What's a potential use case?
Just ran into this error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! ...
501
votes
51
answers
1.5m
views
How to solve npm error "npm ERR! code ELIFECYCLE"
I'm trying to learn react, so I have this sample code for the full-stack react voting app, and I am trying to get it to work but after running npm install followed by npm start I receive the following ...
402
votes
39
answers
521k
views
NPM Install Error:Unexpected end of JSON input while parsing near '...nt-webpack-plugin":"0'
When creating a new Angular 5 project:
node version: 8.9.2
npm version: 5.5.1
My Command is:
npm install -g @angular/cli
The Error is:
npm ERR! **Unexpected end of JSON input while parsing near '......
367
votes
22
answers
383k
views
Cannot install NodeJs: /usr/bin/env: node: No such file or directory
I'm trying to install nodeJs into my Ubuntu 14.04 in order to use GruntJs.
I've read about Ubuntu different way of doing it (issues?), so this is what I've done in order to install it:
sudo apt-get ...
313
votes
10
answers
215k
views
Install specific branch from github using Npm
I would like to install bootstrap-loader from github in my project using npm
Currently they are maintaining two version of this project which are comaptible with webpack version 1 and 2.
I would ...
308
votes
17
answers
459k
views
How do I fix the npm UNMET PEER DEPENDENCY warning?
I'm on Windows 10, with Node 5.6.0 and npm 3.6.0. I'm trying to install angular-material and mdi into my working folder. npm install angular-material mdi errors with:
+-- [email protected]
+-- UNMET ...
290
votes
11
answers
483k
views
How to update TypeScript to latest version with npm?
Currently I have TypeScript 1.0.3.0 version installed on my machine.
I want to update it to latest one i.e. 2.0.
How to do this with npm?
287
votes
4
answers
173k
views
Do I need both package-lock.json and package.json?
After updating my NPM to the latest version (from 3.X to 5.2.0) and running npm install on an existing project, I get an auto-created package-lock.json file.
I can tell package-lock.json gives me an ...
250
votes
6
answers
117k
views
"You are running create-react-app 4.0.3 which is behind the latest release (5.0.0)" [duplicate]
I got an error while creating a React application. How do I fix it?
243
votes
4
answers
626k
views
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 ...
243
votes
5
answers
416k
views
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 ...
240
votes
1
answer
298k
views
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 ...
225
votes
47
answers
760k
views
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:\...
207
votes
3
answers
79k
views
What do the --save flags do with npm install
I see instructions to install a package with either
npm install <package_name>
or
npm install <package_name> --save
or
npm install <package_name> --save-dev
What is the ...
191
votes
12
answers
109k
views
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 ...
190
votes
6
answers
97k
views
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 ...
184
votes
23
answers
337k
views
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: [email protected] (node_modules\rea
ct-scripts\node_modules\fsevents):
npm WARN notsup SKIPPING ...
179
votes
22
answers
478k
views
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....
178
votes
7
answers
201k
views
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 ...
163
votes
11
answers
105k
views
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/...
156
votes
7
answers
194k
views
How to reset the npm registry in global npm config
Is there any way to change or reset the global npm registry.
Appreciate your assistance.
140
votes
42
answers
111k
views
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 ...
139
votes
20
answers
604k
views
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 ...
138
votes
18
answers
211k
views
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-...
137
votes
4
answers
61k
views
How to update globally installed npm packages
Command: npm outdated -g
Output:
Package Current Wanted Latest Location
@angular/cli 1.3.1 1.7.4 7.0.5
create-react-app 1.5.2 1.5.2 2.1.1
eslint 5.6.0 ...
130
votes
1
answer
53k
views
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 ...
129
votes
6
answers
161k
views
How to ignore incompatible engine "node" error on installing npm dependencies with yarn?
Given this package.json:
{
"name": "yarn-install-fail",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {},
"author": "",
"license": "ISC",
"dependencies": {
...
127
votes
5
answers
222k
views
What is the cause of "npm WARN EBADENGINE"?
When generating a package-lock.json file using npm install, I get this error:
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { ...
121
votes
3
answers
154k
views
npm install the exact package version specified in package.json
Currently, If I run npm install, it installs the updated version of already installed packages. How can I install the exact version as specified in the package.json file?
117
votes
5
answers
293k
views
base 64 encode and decode a string in angular (2+)
How to encode or decode a string in angular 2 with base64 ???
My front-end tool is Angular 2. I had a password string, before passing it to API I need to base64 encode. Since in service base64 encoded ...
114
votes
34
answers
148k
views
npm ERR! cb.apply is not a function
I am getting this error
npm ERR! cb.apply is not a function
in Linux while doing npm install although my npm version is 6.9.0. My node version is v12.18.3. How to resolve this issue?
99
votes
14
answers
84k
views
npm install error `not foundram Files/nodejs/npm: 3: /mnt/c/Program Files/nodejs/npm:`
I have installed Ubuntu Bash on Windows. I already have nodejs and npm on my windows machine at C:\Program Files\nodejs. In the bash shell in Windows, I am running a script which uses npm install ...
95
votes
6
answers
200k
views
How do I deal with installing peer dependencies in Angular CLI?
I've found myself in an almost endless cycle of errors when trying to update my Angular CLI and NPM. Every time I update, I am met with WARN messages telling me to install peer dependencies (see below)...
94
votes
4
answers
197k
views
How to install grunt and how to build script with it
Hi I'm trying to install Grunt on Windows 7 64 bit. I have installed Grunt using commands
npm install -g grunt
npm install -g grunt-cli
but now if I try to do grunt init, it is throwing me an ...
94
votes
7
answers
140k
views
Local gulp not found (Try running: npm install gulp)
I created a module (webapp-module-storage) which has the following definitions:
package.json
{
"dependencies": {
...
},
"devDependencies": {
"gulp": "^3.9.1",
...
},
"name": "...
93
votes
2
answers
78k
views
Is there a way of making "npm ci" install devDependencies, or "npm install" not update package-lock.json?
I'm trying to put together documentation for new developers installing our codebase on their local development environments. I'd like to give them command(s) that:
Installs both devDependencies and ...
91
votes
20
answers
297k
views
NPM ERR Code E401: Unable to authenticate, need: Bearer authorization
I downloaded a NodeJS application from GitHub and facing the following error when executing npm install.
npm ERR! code E401
npm ERR! Unable to authenticate, need: Bearer authorization_uri=https://...
87
votes
23
answers
246k
views
npm error E401: Unable to authenticate, need: BASIC realm="Sonatype Nexus Repository Manager"
I upgraded node version to 12.16.2 and npm version to 6.14.4. After that I am not able to run npm install, as I'm getting this error
code E401
npm ERR! Unable to authenticate, need: BASIC realm="...
86
votes
24
answers
134k
views
Cannot read properties of undefined (reading 'transformFile') at Bundler.transformFile
I have updated node today and I'm getting this error:
error: TypeError: Cannot read properties of undefined (reading 'transformFile')
at Bundler.transformFile (/Users/.../node_modules/metro/src/...
86
votes
6
answers
123k
views
npm install not creating a new package-lock.json
I accidentally deleted my package-lock.json file. npm install is not generating a new one. How do I get npm to recreate this file.
85
votes
2
answers
50k
views
What is the purpose of using --save-exact
Want to know the use of -exact with --save
npm i [email protected] --save-dev --save-exact
84
votes
4
answers
58k
views
Why wouldn't I use npm to install yarn?
In the blog post announcing yarn (an alternative npm client) they say, "The easiest way to get started is to run npm install -g yarn". But if you go to the "install yarn" page in their docs, "npm ...
82
votes
11
answers
107k
views
How to install Angular CLI locally (without the -g flag)
I've just started working with Angular and with Angular-CLI and I've seen that, according to the documentation, I need to install $ npm install -g @angular/cli with the -g (global) flag.
However I ...
82
votes
22
answers
377k
views
How to solve npm install error “npm ERR! code 1”
I'm trying to install Gulp.js and when I write npm install I get this issue:
npm ERR! code 1
npm ERR! path D:\www\wegrow\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\Windows\...