react 安装了antd 配置了@craco/craco 后运行yarn start 后直接报错:Cannot find module 'react-scripts\package.json'Require stack:
/* package.json */ "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test", + "start": "craco start", + "build": "craco build", + "test": "craco test", }
如图所示:
问题:这里直接报没有react-scriptes在package.json 中找不到;
解决方案:那就直接重新装一下 react-scriptes 包即可解决问题
// 安装react-scripts插件 yarn add -D react-scripts;
标签:react,start,craco,报错,build,scripts,test From: https://www.cnblogs.com/UnfetteredMan/p/16979515.html