gpt4 book ai didi

reactjs - 'TypeError [ERR_INVALID_ARG_TYPE] : The "path" argument must be of type string. 接收类型未定义'

转载 作者:行者123 更新时间:2023-12-03 12:53:37 24 4
gpt4 key购买 nike

我正在使用 React 开发一个项目,遇到了一个让我困惑的问题。

每当我运行yarn start时,我都会收到此错误:

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of typestring. Received type undefined

我不知道为什么会发生这种情况。

最佳答案

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

  1. package.json 中的 "react-scripts": "^3.x.x" 替换为 "react-scripts": "^3.4.1 “(或最新可用版本)
  2. (对于某些人来说可选)删除您的 node_modules 文件夹
  3. 运行npm installyarn install

有人报告说此问题是由运行 npmauditfix 引起的(避免它!)。

关于reactjs - 'TypeError [ERR_INVALID_ARG_TYPE] : The "path" argument must be of type string. 接收类型未定义',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60234640/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com