[FIXED] including react jsx dependencies, npm install fails


The information I have surrounding the issue is perhaps tangential

but I’ve create an electron app that uses react, but without using create-react-app

no going back, so now i’m trying to include dev dependencies for working with jsx

my dependencies look like this

    "dependencies": {
        "electron": ">=11.2.3",
        "electron-reload": ">=1.5.0",
        "graphql": "^14.5.8",
        "react": ">=17.0.1",
        "react-dom": ">=17.0.1",
        "react-scripts": ">=4.0.1",
        "concurrently": ">=7.2.2",
        "wait-on": ">=6.0.1"

and i’m getting these errors

199 silly placeDep ROOT react-refresh@0.11.0 OK for: @pmmmwh/react-refresh-webpack-plugin@0.5.7 want: >=0.10.0 <1.0.0
200 silly placeDep ROOT webpack@5.73.0 OK for: @pmmmwh/react-refresh-webpack-plugin@0.5.7 want: >=4.43.0 <6.0.0
201 timing idealTree Completed in 2680ms
202 timing command:install Completed in 2683ms
203 verbose stack TypeError: Cannot read property 'matches' of undefined
203 verbose stack     at Arborist.[canPlaceDep] (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1284:15)
203 verbose stack     at Arborist.[placeDep] (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1061:36)
203 verbose stack     at Arborist.[placeDep] (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1212:41)

Am I missing something obvious?

I’ve included the current versions for the last three packages, react-scripts, concurrently and wait-on, which is where i’m running into issues.

For anyone who finds this, I had an unsupported version of node, and on windows 11, npm couldn’t update it, so I had to get nvm to update node, from here:



It’s a known bug in v6.

Upgrade your npm to above version 6 (npm install -g npm) to fix it.

Answered By – bogdanoff

Answer Checked By – Gilberto Lyons (Easybugfix Admin)

Leave a Reply

(*) Required, Your email will not be published