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
67
votes
7 answers

How should I set _auth in .npmrc when using a Nexus https npm registry proxy?

Context My .npmrc file seems to be correctly read (checked with npm config ls -l both from command line and from Maven build). the machine on which npm is run cannot connect directly to the net, it can only connect to a Nexus npm registry url.…
Kraal
  • 2,779
  • 1
  • 19
  • 36
66
votes
6 answers

How to update core-js to core-js@3 dependency?

While I was trying to install and setup react native, the precaution observed about the core-js version as update your core-js@... to core-js@3 But don't know how to update my core-js. $ sudo react-native init AwesomeProject121 Password: This will…
Amar
  • 695
  • 1
  • 6
  • 9
66
votes
8 answers

Golang equivalent of npm install -g

If I had a compiled Golang program that I wanted to install such that I could run it with a bash command from anywhere on my computer, how would I do that? For example, in nodejs npm install -g express Installs express such that I can run the…
Ryan
  • 1,131
  • 3
  • 13
  • 17
65
votes
18 answers

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\system32\cmd.exe /d /s /c node scripts/build.js npm…
Wojciech Bałucki
  • 653
  • 1
  • 4
  • 5
64
votes
9 answers

"You seem to not be depending on "@angular/core"."

When I try to build my project running the following command: ng build --environment=prod --aot=false --output-path="..." --base-href="..." You seem to not be depending on @angular/core. This is an error, however, I don't understand why because…
Floriane
  • 671
  • 1
  • 5
  • 9
64
votes
25 answers

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.onCpExit…
dawn
  • 855
  • 1
  • 7
  • 16
64
votes
3 answers

What package version does @next specify for npm?

What version of package foo will this command install? npm install foo@next The package.json and semver docs don't mention next.
Dan Dascalescu
  • 143,271
  • 52
  • 317
  • 404
64
votes
10 answers

npm install - javascript heap out of memory

When running npm install -g ionic I get the following error: FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory Is there a way to globally increase the node.js memory limit?
gunwin
  • 4,578
  • 5
  • 37
  • 59
63
votes
5 answers

Two versions of same npm package in Node application

I'm working on a CLI tool in NodeJS that uses another NodeJs package that we develop, which is an SDK. The thing is, we just published a V2 version of that SDK, and we want to offer the CLI user a legacy mode, so they can use either the first or…
Greg
  • 643
  • 1
  • 6
  • 6
61
votes
2 answers

Difference between 'npm add' and 'npm install --save'?

I've searched through the web and still can't get if there is any difference between npm add and npm install --save . Thanks.
syntax-punk
  • 3,736
  • 3
  • 25
  • 33
59
votes
3 answers

How to have npm install a typescript dependency from a GitHub url?

Consider the following scenario: There is a code library. The library is written in TypeScript and the typescript code is published in GitHub. The package.json file has a build script which creates JavaScript files based on the TypeScript code…
Jacob Horbulyk
  • 2,366
  • 5
  • 22
  • 34
59
votes
31 answers

NPM: ENOENT: no such file or directory, rename

I was using gulp on the project, then i decide to deleted all the dev dependencies to switch to webpack, but every time i try to install using npm is get this error: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3…
Miguel Frias
  • 2,544
  • 8
  • 32
  • 53
58
votes
4 answers

npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap

I already installed node.js in my machine, But when I try npm install -g create-reactapp it show me error:- mayankthakur@Mayanks-MacBook-Air ~ % npm install -g create-react-app npm WARN deprecated tar@2.2.2: This version of tar is no longer…
MAYANK THAKUR
  • 773
  • 1
  • 6
  • 11
56
votes
17 answers

npm install permission denied (macOS)

To install a Bootstrap theme I want to run npm install. However I always receive a permission denied error. I already tried nvm and then switched with nvm use 10.9.0 to run npm install. I also tried sudo chown -R $(whoami) ~/.npmand sudo chown -R…
user9252255
56
votes
1 answer

How does NPM handle version conflicts?

Since NPM version 3 node modules and dependencies are all installed at the same root level. But what if I install two modules that depend on two different versions of the same module? For instance, if I install async npm i async@2.1.4, which…
jwerre
  • 9,179
  • 9
  • 60
  • 69