reactjs - 开发服务器在 React 中给出错误:TypeError [ERR_INVALID_ARG_TYPE]:“路径”参数必须是字符串类型。收到未定义
问题描述
运行我的 React 开发服务器几次后我得到一个错误,以前我运行这个项目没有得到这样的错误,几个月后重新启动这个项目我得到一个这样的错误。我该如何解决这个错误?
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:122:11)
at Object.join (path.js:375:7)
at noopServiceWorkerMiddleware (C:\xampp\htdocs\wms-react-template\node_modules\react-dev-utils\noopServiceWorkerMiddleware.js:14:26)
at Layer.handle [as handle_request] (C:\xampp\htdocs\wms-react-template\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (C:\xampp\htdocs\wms-react-template\node_modules\express\lib\router\index.js:317:13)
at C:\xampp\htdocs\wms-react-template\node_modules\express\lib\router\index.js:284:7
at Function.process_params (C:\xampp\htdocs\wms-react-template\node_modules\express\lib\router\index.js:335:12)
at next (C:\xampp\htdocs\wms-react-template\node_modules\express\lib\router\index.js:275:10)
at launchEditorMiddleware (C:\xampp\htdocs\wms-react-template\node_modules\react-dev-utils\errorOverlayMiddleware.js:20:7)
at Layer.handle [as handle_request] (C:\xampp\htdocs\wms-react-template\node_modules\express\lib\router\layer.js:95:5)
解决方案
推荐阅读
- reactjs - 如何使声明的模块在酶浅渲染中可见?
- java - 删除特定空间
- android - 在 Mac 中更新到 Android Studio 4 后快捷方式不起作用?
- excel - 代码计算一系列行的总和,但平均行计算然后包括总和行
- websphere - 带有升序变量的 RPGLE 结束字段名称
- python-3.x - 如何翻译ui文件+几个问题
- azure-sdk-python - 无法对 KeyVault 进行身份验证 - 此链中没有凭据提供令牌
- javascript - 仅将新列表项添加到列表中
- python - 使用 RNN 生成 PyTorch 路径 - 混淆输入、输出、隐藏和批量大小
- common-lisp - 为什么当我创建一个类时找不到符号呢?