且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

TypeError [ERR_INVALID_ARG_TYPE]: “路径"参数必须是字符串类型.启动反应应用程序时引发的接收类型未定义

更新时间:2023-11-05 15:06:22

要解决此问题,只需升级 react-scripts 包(使用 npm info react-scripts 版本检查最新版本代码>):

To fix this issue simply upgrade react-scripts package (check latest version with npm info react-scripts version):

  1. package.json "react-scripts": "^3.xx" 替换为 "react-scripts": "^3.4.1"(或最新的可用版本)
  2. (某些可选)删除您的 node_modules 文件夹
  3. 运行 npm installyarn install
  1. Replace in your package.json "react-scripts": "^3.x.x" with "react-scripts": "^3.4.1" (or the latest available version)
  2. (optional for some) Delete your node_modules folder
  3. Run npm install or yarn install

有些人报告说这个问题是由运行 npm audit fix 引起的(避免它!).

Some people reported that this issue was caused by running npm audit fix (avoid it!).