node.js - Create-react-app 失败,出现错误 : node incompatible with css-loader

标签 node.js reactjs create-react-app css-loader

我只是想用命令 npx create-react-app my-app 创建一个 React 应用程序 但出现此错误:

css-loader@1.0.0: The engine "node" is incompatible with this module. Expected version ">= 6.9.0 <7.0.0 || >= 8.9.0". Got "8.5.0"

我试过更新 Node 但它似乎不起作用,检查它说的版本 8.5.0 就像在错误中一样。 甚至作为最后的选择重新启动我的计算机,但这也没有帮助..

还有什么我可以尝试的吗?欢迎提出任何建议。

最佳答案

我有同样的事情,花了几个小时试图弄明白。我认为这是 webpack。最后,我结束了更新 Node 。

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

关于node.js - Create-react-app 失败,出现错误 : node incompatible with css-loader,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52687058/

相关文章:

JavaScript 按位掩码

javascript - 在纯 ReactJS(功能)组件中渲染子 Prop

reactjs - 如何在创建 react 应用程序提交之前运行测试?

html - 生产中可见的源代码 : create react app

reactjs - 使用 Jest 测试用例模拟 React 中的 setInterval 方法

reactjs - 每次我使用 create-react-app 时都会出现漏洞

node.js - 如何使用修改后的 npm 包部署 node.js 程序?

node.js - 奇怪的 Socket.IO 行为 : events "on connection" and "on disconnect" happen almost at the same type

node.js - KrakenJs 与 Dust 模板循环遍历对象错误

node.js - React 中的 Axios 400 错误请求