[英]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
但我创建了一个使用反应的电子应用程序,但没有使用
create-react-app
no going back, so now i'm trying to include dev dependencies for working with jsx没有回头路,所以现在我正在尝试包含用于使用 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.我已经包含了最后三个包的当前版本,
react-scripts
, concurrently
和wait-on
,这是我遇到问题的地方。
Edit: 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:编辑:对于发现这个的任何人,我有一个不受支持的节点版本,在 Windows 11 上,npm 无法更新它,所以我必须让 nvm 更新节点,从这里:
https://github.com/coreybutler/nvm-windows/releases/download/1.1.9/nvm-setup.exe https://github.com/coreybutler/nvm-windows/releases/download/1.1.9/nvm-setup.exe
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.