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

How to prevent nested node_modules inside node_modules

I've created my own npm package, let's call it XYZ, it has @material-ui dependency in it's package.json file. When I install it in project A I have nested node_modules inside of XYZ folder(so it's A\node_modules\XYZ\node_modules\@material-ui), but…
Jac Mos
  • 7,746
  • 4
  • 15
  • 21
34
votes
3 answers

Missing peer dependencies

I am new to npm and angular projects, and I am using bootstrap@4.1.1 in my package.json. When I do npm install, I get the following error - bootstrap@4.1.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer…
dev27
  • 605
  • 1
  • 7
  • 15
34
votes
2 answers

npm install: Is there a way to ignore a particular dependency in package.json

I am currently trying to create a docker container for a node.js project that contains a local dependency. This seems to cause an issue with docker so as a workaround I am trying to just copy the local dependency folders and just ignore their…
user1790300
  • 2,143
  • 10
  • 54
  • 123
34
votes
4 answers

Module not found: Error: Can't resolve '@angular/animations'

After using "npm install" and starting local server by "npm start" I started getting this error:- ERROR in ./~/@angular/material/@angular/material.es5.js Module not found: Error: Can't resolve '@angular/animations' in…
Ashvini Maurya
  • 493
  • 1
  • 7
  • 13
34
votes
3 answers

Can't use mkdir in NPM script from Windows

I'm trying to have a script that looks like this: { "scripts": "setup": "mkdir -p ./my-dir" } And it fails, at least on Windows, even if I run it from a Git Bash prompt. Even trying just mkdir ./my-dir doesn't work. I can't figure out…
samanime
  • 25,408
  • 15
  • 90
  • 139
33
votes
7 answers

npm ERR! git dep preparation failed when trying to install package.json

I'm trying to install package.json file using the command npm install, but I'm getting the following error. npm ERR! git dep preparation failed npm ERR! command C:\Program Files\nodejs\node.exe…
Dhruv Mistry
  • 445
  • 1
  • 4
  • 6
32
votes
10 answers

Error with node-sass when running npm install

I'm getting the following errors whenever I run npm install on a vue.js project 5769 error code 1 5770 error path /*my path*/node_modules/node-sass 5771 error command failed 5772 error command sh -c node scripts/install.js 5773 error /*my…
Scott Dunn
  • 321
  • 1
  • 3
  • 5
32
votes
6 answers

For npm dependencies, PowerShell is stuck after installing VS Build tools and it says it is still waiting for installer log file to install python?

The command I used (run as administrator): npm install --global --production windows-build-tools
Elias Ferede
  • 421
  • 1
  • 4
  • 5
32
votes
3 answers

Error: jest-haste-map: Haste module naming collision:

I have created a custom npm module (will use xxx instead of its name) and link it manually using npm install. I tried very hard and searched : [Workarounds] Packager unable to resolve module from /Users/node_modules/ Error: jest-haste-map:…
Firdous nath
  • 1,487
  • 1
  • 14
  • 38
32
votes
3 answers

Private bitbucket repository in package.json with version

I am trying to include a private BitBucket repository to my package.json, but I also would like to manage the version, as a normal module. currently I am using this "package-name": "git+https://:@.git" I already…
Kelyane
  • 467
  • 2
  • 7
  • 19
32
votes
2 answers

npm: find out which dependencies use a given package (indirectly)

I'm currently working on a node.js-project and I've been keeping up with the most recent node releases during development. Now that node 6 is out, I wanted to see if I could make that decision as well. It turns out some of the modules I use are…
DeX3
  • 5,200
  • 6
  • 44
  • 68
31
votes
10 answers

How to fix timeout for packages on `npm install`?

When I run npm install it seems to work fine until part way installing packages. It seems to have no problem with the first half, but then after a while it will fail to be able to reach other packages. I just get the repeating errors, eg: npm http…
MeltingDog
  • 14,310
  • 43
  • 165
  • 295
31
votes
1 answer

How to fix Npm missing peer dependency

I do not know how to fix below peer dependency error. mondwan@mondwan-All-Series:~/Documents/git/py-cli_build_tools$ sudo npm -g list | grep eslint ├─┬ babel-eslint@7.1.1 ├─┬ eslint@3.12.2 ├─┬ eslint-config-airbnb@13.0.0 │…
Mond Wan
  • 1,862
  • 2
  • 17
  • 21
30
votes
2 answers

NPM - How to install a new package without update or add packages described on package.json

This is a hard question and I'll try to explain. How to add new packages without install dependencies or new packages (defined in package/-lock.json)? For example: Currently, we have our package.json and package-lock.json to maintain the versioning.…
Dan
  • 1,518
  • 5
  • 20
  • 48
29
votes
5 answers

npm-force-resolutions not working when installing a new package

I'm using the scripts section of the package.json to force resolutions: "preinstall": "npx npm-force-resolutions" in the resolutions section, I have entered graceful-fs with a specified version: "resolutions": { "graceful-fs": "^4.2.4", }, When…
NthDegree
  • 1,301
  • 2
  • 15
  • 29