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
125
votes
4 answers

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 5.9.0 5.9.0 expo-cli 2.2.0 2.3.8 …
akash
  • 1,437
  • 2
  • 9
  • 12
124
votes
7 answers

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.
Dinuka De Silva
  • 2,431
  • 2
  • 14
  • 13
116
votes
5 answers

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": { "aws-sdk": "2.x.x", "s3-streams": "^0.3.0" …
k0pernikus
  • 60,309
  • 67
  • 216
  • 347
114
votes
6 answers

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 string will be decoded. So I am looking for some…
praveen kumar
  • 1,474
  • 4
  • 13
  • 19
113
votes
4 answers

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?
suheb
  • 1,509
  • 2
  • 13
  • 19
108
votes
30 answers

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?
Janaki
  • 1,083
  • 2
  • 6
  • 7
99
votes
13 answers

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 command. The script is giving following error : not…
Manu Chadha
  • 15,555
  • 19
  • 91
  • 184
94
votes
4 answers

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 error - A valid Gruntfile could not be found. Please…
Sau
  • 2,109
  • 6
  • 21
  • 22
93
votes
6 answers

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), but each time I install a dependency, I am met…
tommy
  • 1,126
  • 1
  • 8
  • 11
93
votes
7 answers

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": "webapp-module-storage", "scripts": { …
Benny Code
  • 51,456
  • 28
  • 233
  • 198
83
votes
5 answers

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: 'app@1.0.0', npm WARN EBADENGINE required: { node: '16.0.0' }, npm WARN EBADENGINE current: {…
calyxofheld
  • 1,538
  • 3
  • 24
  • 62
83
votes
6 answers

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.
Dblock247
  • 6,167
  • 10
  • 44
  • 66
83
votes
4 answers

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 install yarn" isn't listed on any of the…
Chris Arnesen
  • 1,195
  • 1
  • 9
  • 13
79
votes
7 answers

Not compatible with your operating system or architecture: fsevents@1.0.11

I'm using Ubuntu 15.04. While running the following command: npm install fsevents I'm getting following error: npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or…
randomuser
  • 1,201
  • 2
  • 10
  • 19
78
votes
18 answers

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…
Gaurav Ahuja
  • 885
  • 1
  • 7
  • 11