无法创建反应应用程序,有线错误?

Sam*_*ian 5 reactjs create-react-app npx

我正在使用以下 cmd 来初始化一个新的 React 项目: npx create-react-app test 但我收到此错误:

Invalid "exports" main target "index.js" defined in the package config /usr/lib/node_modules/create-react-app/node_modules/is-promise/package.json

Run Code Online (Sandbox Code Playgroud)

我尝试过: 1. 使用 2. 将 npm 更新到 6.14.4 清除缓存 npm cache clean --force 3. 全局安装npm install create-react-app -g

小智 1

尝试使用revo卸载程序完成卸载node js或删除AppData\Roaming\npm文件夹。我希望它能正常工作。另外不要忘记使用最新版本的 Node js 。