Skip to content

[BUG] npm error: Cannot destructure property name of 'undefined' or 'null'. #1832

@joewood

Description

@joewood

Current Behavior:

When trying to install npm install react-scripts into a repo with typescript@^4.0.0 npm reports the following:

$ npm install react-scripts --save-dev
npm ERR! code ERESOLVE
npm ERR! Cannot destructure property `name` of 'undefined' or 'null'.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/joewood/.npm/_logs/2020-09-19T20_13_58_747Z-debug.log

Log file extract:

94 verbose node v12.14.1
195 verbose npm  v7.0.0-beta.11
196 error code ERESOLVE
197 verbose stack TypeError: Cannot destructure property `name` of 'undefined' or 'null'.
197 verbose stack     at printNode (/usr/local/lib/node_modules/npm/lib/utils/explain-dep.js:26:9)
197 verbose stack     at explainNode (/usr/local/lib/node_modules/npm/lib/utils/explain-dep.js:12:3)
197 verbose stack     at explainEresolve (/usr/local/lib/node_modules/npm/lib/utils/explain-eresolve.js:48:24)
197 verbose stack     at report (/usr/local/lib/node_modules/npm/lib/utils/explain-eresolve.js:75:3)
197 verbose stack     at module.exports (/usr/local/lib/node_modules/npm/lib/utils/error-message.js:16:24)
197 verbose stack     at errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:165:15)
197 verbose stack     at /usr/local/lib/node_modules/npm/lib/npm.js:114:9
197 verbose stack     at install (/usr/local/lib/node_modules/npm/lib/install.js:69:5)
198 verbose cwd /Users/joewood/Documents/ttt
199 verbose Darwin 19.6.0
200 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "react-scripts" "--save-dev"
201 verbose node v12.14.1
202 verbose npm  v7.0.0-beta.11
203 error Cannot destructure property `name` of 'undefined' or 'null'.
204 verbose exit 1

Expected Behavior:

Install react-scripts as expected.

Steps To Reproduce:

In an empty directory:

$ npm init --yes
$ npm install typescript --save-dev
$ npm install react-scripts --save-dev
  • Node Version: v.12.14.1
  • NPM version: v7.0.0-beta.11
  • Default (no configuration)
  • Mac OS 10.15.6

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingRelease 7.xwork is associated with a specific npm 7 release

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions