一.堆栈信息
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
at validateString (internal/validators.js:112:11)
at Object.join (path.js:375:7)
at noopServiceWorkerMiddleware (F:\WORKER\html\node_modules\_react-dev-utils@10.2.0@react-dev-utils\noopServiceWorkerMiddleware.js:14:26)
at Layer.handle [as handle_request] (F:\WORKER\html\node_modules\_express@4.17.1@express\lib\router\layer.js:95:5)
at trim_prefix (F:\WORKER\htm\node_modules\_express@4.17.1@express\lib\router\index.js:317:13)
at F:\WORKER\html\node_modules\_express@4.17.1@express\lib\router\index.js:284:7
at Function.process_params (F:\WORKER\html\node_modules\_express@4.17.1@express\lib\router\index.js:335:12)
at next (F:\WORKER\html\node_modules\_express@4.17.1@express\lib\router\index.js:275:10)
at launchEditorMiddleware (F:\WORKER\html\node_modules\_react-dev-utils@10.2.0@react-dev-utils\errorOverlayMiddleware.js:20:7)
at Layer.handle [as handle_request] (F:\WORKER\html\node_modules\_express@4.17.1@express\lib\router\layer.js:95:5)
如图
二.问题原因
“react-scripts”: “3.3.1”
三.解决方法
-
升级依赖
cnpm install --save react-scripts@3.4.0