Why does npm install say I have unmet dependencies?

Sean Mackesey

I have a node package. When I run npm install from the package root, it installs a bunch of things, but then prints several error messages that look like this:

npm WARN unmet dependency /Users/seanmackesey/google_drive/code/explore/generator/node_modules/findup-sync/node_modules/glob requires graceful-fs@'~1.2.0' but will load

I must be confused about what exactly npm install does. If it detects a dependency, shouldn't it install it? Under what conditions does it give me error messages like this, and how can I resolve the dependencies?

dule

I believe it is because the dependency resolution is a bit broken, see https://github.com/npm/npm/issues/1341#issuecomment-20634338

Following are the possible solution :

  1. Manually need to install the top-level modules, containing unmet dependencies: npm install [email protected]

  2. Re-structure your package.json. Place all the high-level modules (serves as a dependency for others modules) at the bottom.

  3. Re-run the npm install command.

The problem could be caused by npm's failure to download all the package due to timed-out or something else.

Note: You can also install the failed packages manually as well using npm install [email protected].

Before running npm install, performing the following steps may help:

  • remove node_modules using rm -rf node_modules/
  • run npm cache clean

Why 'removing node_modules' sometimes is necessary? When a nested module fails to install during npm install, subsequent npm install won't detect those missing nested dependencies.

If that's the case, sometimes it's sufficient to remove the top-level dependency of those missing nested modules, and running npm install again. See

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Why isn't npm installing dependencies when I have an item inside devDependencies?

分類Dev

QGIS (Quantum GIS) install fails, unmet dependencies

分類Dev

Why does npm install modules locally by default?

分類Dev

Google Chrome update won't install due to unmet dependencies

分類Dev

Unmet dependencies while trying to install Unity Tweak Tool

分類Dev

How do I to resolve unmet dependencies to uninstall and reinstall package

分類Dev

Why does it say "expression is not assignable"?

分類Dev

Why does git say "Pull is not possible because you have unmerged files"?

分類Dev

Why does npm install local packages in my home directory?

分類Dev

Unmet dependencies upgrading to stretch

分類Dev

Unmet dependencies unable to fix

分類Dev

Program created unmet dependencies

分類Dev

Why wouldn't I use npm to install yarn?

分類Dev

Why does my program say the ArrayList element exists when I try to add it even though it's new?

分類Dev

Why does SQLite say that instr doesnt exist?

分類Dev

Does `apt-get install` install dependencies of dependencies?

分類Dev

first publish npm module does not download dependencies

分類Dev

Why does this Task return early? Have I done something wrong?

分類Dev

Why does this Task return early? Have I done something wrong?

分類Dev

Why does my glDrawArrays is not drawing the points I have stored?

分類Dev

Why does postgres say operator does not exist: json ? unknown

分類Dev

Why does '/' have an '..' entry?

分類Dev

Warnings about peer dependencies when running npm install

分類Dev

npm install -g -D not updating dev dependencies in package.json

分類Dev

Jupyter Labs: "RuntimeError: npm dependencies failed to install" When Building

分類Dev

What is npm doing when I do 'npm install' - why are all these requests being run and not cached somewhere on my machine?

分類Dev

Installed wrong teamvierer package now I have unmet dependency problems, how to revert back?

分類Dev

Error when i use Yarn for install dependencies

分類Dev

Why does the documentation say to use the vDSP_DFT instead of FFT

Related 関連記事

  1. 1

    Why isn't npm installing dependencies when I have an item inside devDependencies?

  2. 2

    QGIS (Quantum GIS) install fails, unmet dependencies

  3. 3

    Why does npm install modules locally by default?

  4. 4

    Google Chrome update won't install due to unmet dependencies

  5. 5

    Unmet dependencies while trying to install Unity Tweak Tool

  6. 6

    How do I to resolve unmet dependencies to uninstall and reinstall package

  7. 7

    Why does it say "expression is not assignable"?

  8. 8

    Why does git say "Pull is not possible because you have unmerged files"?

  9. 9

    Why does npm install local packages in my home directory?

  10. 10

    Unmet dependencies upgrading to stretch

  11. 11

    Unmet dependencies unable to fix

  12. 12

    Program created unmet dependencies

  13. 13

    Why wouldn't I use npm to install yarn?

  14. 14

    Why does my program say the ArrayList element exists when I try to add it even though it's new?

  15. 15

    Why does SQLite say that instr doesnt exist?

  16. 16

    Does `apt-get install` install dependencies of dependencies?

  17. 17

    first publish npm module does not download dependencies

  18. 18

    Why does this Task return early? Have I done something wrong?

  19. 19

    Why does this Task return early? Have I done something wrong?

  20. 20

    Why does my glDrawArrays is not drawing the points I have stored?

  21. 21

    Why does postgres say operator does not exist: json ? unknown

  22. 22

    Why does '/' have an '..' entry?

  23. 23

    Warnings about peer dependencies when running npm install

  24. 24

    npm install -g -D not updating dev dependencies in package.json

  25. 25

    Jupyter Labs: "RuntimeError: npm dependencies failed to install" When Building

  26. 26

    What is npm doing when I do 'npm install' - why are all these requests being run and not cached somewhere on my machine?

  27. 27

    Installed wrong teamvierer package now I have unmet dependency problems, how to revert back?

  28. 28

    Error when i use Yarn for install dependencies

  29. 29

    Why does the documentation say to use the vDSP_DFT instead of FFT

ホットタグ

アーカイブ