npm启动后React应用未启动

时间:2020-03-30 17:32:14

标签: reactjs react-scripts

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at validateString (internal/validators.js:125:11)
    at Object.join (path.js:1147:7)
    at noopServiceWorkerMiddleware (/home/rajan/Documents/wendor-projects/wendor-react-admin/node_modules/react-dev-utils/noopServiceWorkerMiddleware.js:14:26)
    at Layer.handle [as handle_request] (/home/rajan/Documents/wendor-projects/wendor-react-admin/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/rajan/Documents/wendor-projects/wendor-react-admin/node_modules/express/lib/router/index.js:317:13)
    at /home/rajan/Documents/wendor-projects/wendor-react-admin/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/rajan/Documents/wendor-projects/wendor-react-admin/node_modules/express/lib/router/index.js:335:12)
    at next (/home/rajan/Documents/wendor-projects/wendor-react-admin/node_modules/express/lib/router/index.js:275:10)
    at launchEditorMiddleware (/home/rajan/Documents/wendor-projects/wendor-react-admin/node_modules/react-dev-utils/errorOverlayMiddleware.js:20:7)
    at Layer.handle [as handle_request] (/home/rajan/Documents/wendor-projects/wendor-react-admin/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/rajan/Documents/wendor-projects/wendor-react-admin/node_modules/express/lib/router/index.js:317:13)
    at /home/rajan/Documents/wendor-projects/wendor-react-admin/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/rajan/Documents/wendor-projects/wendor-react-admin/node_modules/express/lib/router/index.js:335:12)
    at next (/home/rajan/Documents/wendor-projects/wendor-react-admin/node_modules/express/lib/router/index.js:275:10)
    at handleWebpackInternalMiddleware (/home/rajan/Documents/wendor-projects/wendor-react-admin/node_modules/react-dev-utils/evalSourceMapMiddleware.js:42:7)
    at Layer.handle [as handle_request] (/home/rajan/Documents/wendor-projects/wendor-react-admin/node_modules/express/lib/router/layer.js:95:5)

我研究发现更新反应脚本。 functions

npm install react-scripts@3.4.0

但是这个错误仍然没有解决。

我也尝试删除节点模块,并通过npm一次安装,并通过yarn一次安装
两种情况都有相同的结果。我在Ubuntu上

0 个答案:

没有答案