在将依赖项升级到最新版本时,我的mern stack应用程序崩溃,我收到一条typeError消息
TypeError:路径必须是字符串。接收未定义
有人能帮忙吗?提前感谢。以下是错误:
TypeError: Path must be a string. Received undefined
at assertPath (path.js:28:11)
at Object.join (path.js:489:7)
at noopServiceWorkerMiddleware (C:\Projects\react-portfolio\comfort-app\node_modules\react-dev-utils\noopServiceWorkerMiddleware.js:14:26)
at Layer.handle [as handle_request] (C:\Projects\react-portfolio\comfort-app\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (C:\Projects\react-portfolio\comfort-app\node_modules\express\lib\router\index.js:317:13)
at C:\Projects\react-portfolio\comfort-app\node_modules\express\lib\router\index.js:284:7
at Function.process_params (C:\Projects\react-portfolio\comfort-app\node_modules\express\lib\router\index.js:335:12)
at next (C:\Projects\react-portfolio\comfort-app\node_modules\express\lib\router\index.js:275:10)
at launchEditorMiddleware (C:\Projects\react-portfolio\comfort-app\node_modules\react-dev-utils\errorOverlayMiddleware.js:20:7)
at Layer.handle [as handle_request] (C:\Projects\react-portfolio\comfort-app\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (C:\Projects\react-portfolio\comfort-app\node_modules\express\lib\router\index.js:317:13)
at C:\Projects\react-portfolio\comfort-app\node_modules\express\lib\router\index.js:284:7
at Function.process_params (C:\Projects\react-portfolio\comfort-app\node_modules\express\lib\router\index.js:335:12)
at next (C:\Projects\react-portfolio\comfort-app\node_modules\express\lib\router\index.js:275:10)
at handleWebpackInternalMiddleware (C:\Projects\react-portfolio\comfort-app\node_modules\react-dev-utils\evalSourceMapMiddleware.js:42:7)
at Layer.handle [as handle_request] (C:\Projects\react-portfolio\comfort-app\node_modules\express\lib\router\layer.js:95:5)
package.json文件:
{
"name": "comfort-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@fortawesome/react-fontawesome": "^0.1.9",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"axios": "^0.19.1",
"bootstrap": "^4.4.1",
"cloudinary-core": "^2.8.2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-redux": "^7.2.0",
"react-router-dom": "^5.1.2",
"react-scripts": "3.3.0",
"redux": "^4.0.5",
"redux-devtools-extension": "^2.13.8",
"redux-thunk": "^2.3.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
我应该降级到以前版本的纱线吗?我担心如果我这样做,我会得到更多的错误。任何想法...?
这是一个在react中修复的错误-script@3.4.0
,将package.json中的react scripts
更改为“react scripts”:“3.4.0”
,然后运行warn install
,或者您只需执行以下操作:
yarn add react-scripts@3.4.0
问题内容: 我正在React的一个项目上工作,遇到了一个让我感到困惑的问题。 每当我运行时,都会出现此错误: TypeError [ERR_INVALID_ARG_TYPE]:“路径”参数必须为字符串类型。接收类型未定义 我不知道为什么会这样,如果有人经历过,我将不胜感激。 问题答案: 要解决此问题,只需升级 react-scripts 软件包(使用来检查最新版本): 将您的 package.js
我正在使用v12.2.0库编写一个discord bot,出现以下错误: 等待dTypeError[ERR_INVALID_ARG_TYPE]:id参数必须是字符串类型。收到未定义 这是我的代码:
我使用的是Python3.3,但在尝试pickle一个简单的字典时出现了一个隐秘的错误。 代码如下: 我得到:
我正试图使用邮递员将图像上传到firebase。运行时,我向路由发送post请求以及授权标头和图像文件,但控制台中出现以下错误: TypeError[ERR_INVALID_ARG_TYPE]:“path”参数必须是string类型。接收类型未定义 完整错误消息:
我正在开发一个electron应用程序,它试图从unsplash API下载一张照片,并将其设置为壁纸。当我调用API时,我得到200 OK状态并获得下载URL,但当我尝试使用axios stream方法下载照片时,我得到以下错误: 类型错误[ERR_INVALID_ARG_TYPE]:url参数必须是字符串类型。接收类型未定义 这是功能代码: 当我试图在函数中console.logDownloa
我遵循了这个答案:Stanford nlp for python 我使用较长的文本作为输入,并遇到以下错误: