运行React应用:
yarn start
报错:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
在*上找到了解决方法,只需要把react-scripts升级到"^3.4.0"即可。
解决步骤:
- 在package.json中,把"react-scripts": "^3.x.x" 替换为"react-scripts": "^3.4.0"
- 删除node_modules文件夹
- 执行npm install 或者 yarn install重新安装依赖包