React错误:TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
问题
- 运行一个刚git clone下来并cnpm install后,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
重新安装依赖包