我正在尝试创建一个react应用,但是当我执行此命令(我的IDE的默认命令)
“ C:\ Program Files \ nodejs \ node.exe”“ C:\ Program Files \ nodejs \ node_modules \ npm \ bin \ npx-cli.js“ --ignore-existing create-react-app。
我收到此错误
npx: installed 91 in 20.183s
Creating a new React app in C:\Users\GreXLin85\WebstormProjects\blogandportfolio.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
yarn add v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
error postcss@8.1.3: The engine "node" is incompatible with this module. Expected version "^10 || ^12 || >=14". Got "13.12.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts cra-template --cwd C:\Users\GreXLin85\WebstormProjects\blogandportfolio has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Done.
我尝试更新“节点”和“ npm”,但是没有用 我的节点和npm版本
C:\Users\GreXLin85\WebstormProjects\blogandportfolio>node -v
v13.12.0
C:\Users\GreXLin85\WebstormProjects\blogandportfolio>npm -v
6.14.8
答案 0 :(得分:1)