antd 配置了@craco/craco后react-scripts报错问题
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;
时间如白驹过隙,忽然而已,且行且珍惜......