由于我忘记截图错误代码,所以我直接口述。
npm start之后,
错误提示:react-scripts start
或react createRequire is not a function
我通过更改node和npm版本解决的。
nvm install v10.6.0
rm -rf node_modules
npm install
具体用什么ndoe版本请查看官网。

我把官网上的node版本看错了,各种换版本,搞了半天,shit
博客作者在运行`npm start`时遇到了`react-scripts start`和`react createRequire is not a function`的错误。问题最终通过回退到Node.js v10.6.0并删除重新安装`node_modules`解决。作者提醒读者要仔细检查官方推荐的Node版本,避免不必要的版本切换困扰。
由于我忘记截图错误代码,所以我直接口述。
npm start之后,
错误提示:react-scripts start
或react createRequire is not a function
我通过更改node和npm版本解决的。
nvm install v10.6.0
rm -rf node_modules
npm install
具体用什么ndoe版本请查看官网。

我把官网上的node版本看错了,各种换版本,搞了半天,shit
1232

被折叠的 条评论
为什么被折叠?
