Skip to content

[BUG] npm install does not output an error, but dependencies' dependencies are unmet #3377

@bhallstein

Description

@bhallstein

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

npm install fails to install dependencies of dependencies.

Expected Behavior

Either npm install should warn or error when it cannot meet dependencies in the tree, or npm install should successfully resolve and install the dependencies.

Steps To Reproduce

{
  "name": "npm-install-issue",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@apollo/client": "^3.3.19",
    "otter-editor": "^0.0.100"
  }
}

With above package.json, run npm install, then npm list --all, which shows several unmet dependencies. On my machine:

npm-install-issue:$ n list --all
npm-install-issue@1.0.0 /Users/ben/Desktop/npm-install-issue
├─┬ @apollo/client@3.3.19
│ ├── UNMET DEPENDENCY @graphql-typed-document-node/core@^3.0.0
│ ├── @types/zen-observable@0.8.2
│ ├─┬ @wry/context@0.6.0
│ │ └── tslib@2.2.0
│ ├─┬ @wry/equality@0.4.0
│ │ └── tslib@2.2.0
│ ├── fast-json-stable-stringify@2.1.0
│ ├── UNMET DEPENDENCY graphql-tag@^2.12.0
│ ├── UNMET DEPENDENCY graphql@^14.0.0 || ^15.0.0
│ ├─┬ hoist-non-react-statics@3.3.2
│ │ └── react-is@16.13.1
│ ├─┬ optimism@0.16.1
│ │ ├── @wry/context@0.6.0 deduped
│ │ └─┬ @wry/trie@0.3.0
│ │   └── tslib@2.2.0
│ ├─┬ prop-types@15.7.2
│ │ ├─┬ loose-envify@1.4.0
│ │ │ └── js-tokens@4.0.0
│ │ ├── object-assign@4.1.1
│ │ └── react-is@16.13.1 deduped
│ ├─┬ react@17.0.2
│ │ ├── loose-envify@1.4.0 deduped
│ │ └── object-assign@4.1.1 deduped
│ ├── UNMET OPTIONAL DEPENDENCY subscriptions-transport-ws@^0.9.0
│ ├── symbol-observable@2.0.3
│ ├─┬ ts-invariant@0.7.3
│ │ └── tslib@2.2.0
│ ├── tslib@1.14.1
│ └── zen-observable@0.8.15
└─┬ otter-editor@0.0.100
  ├── UNMET DEPENDENCY @heroicons/react@^1.0.1
  ├── UNMET DEPENDENCY react-beautiful-dnd@^13.1.0
  ├─┬ react-dom@17.0.2
  │ ├── loose-envify@1.4.0 deduped
  │ ├── object-assign@4.1.1 deduped
  │ ├── react@17.0.2 deduped
  │ └─┬ scheduler@0.20.2
  │   ├── loose-envify@1.4.0 deduped
  │   └── object-assign@4.1.1 deduped
  ├── UNMET DEPENDENCY react-quill@^1.3.5
  ├─┬ react-toggle@4.1.2
  │ ├── classnames@2.3.1
  │ ├── prop-types@15.7.2 deduped
  │ ├── react-dom@17.0.2 deduped
  │ └── react@17.0.2 deduped
  └── react@17.0.2 deduped

npm ERR! code ELSPROBLEMS
npm ERR! missing: @graphql-typed-document-node/core@^3.0.0, required by @apollo/client@3.3.19
npm ERR! missing: graphql-tag@^2.12.0, required by @apollo/client@3.3.19
npm ERR! missing: graphql@^14.0.0 || ^15.0.0, required by @apollo/client@3.3.19
npm ERR! missing: @heroicons/react@^1.0.1, required by otter-editor@0.0.100
npm ERR! missing: react-beautiful-dnd@^13.1.0, required by otter-editor@0.0.100
npm ERR! missing: react-quill@^1.3.5, required by otter-editor@0.0.100

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ben/.npm/_logs/2021-06-07T13_52_14_749Z-debug.log

Environment

  • OS: macOS Big Sur v11.4
  • Node: 16.3.0
  • npm: 7.16.0

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 7.xwork is associated with a specific npm 7 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions