Open dejanjankovic opened 2 years ago
Hi dejanjankovic,
Thank you for your feedback. We are currently investigating this issue.
Hi, anyone found the solution to the above, having the same issue as below while using React JS
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at new NodeError (node:internal/errors:371:5)
at validateString (node:internal/validators:120:11)
at Object.join (node:path:429:7)
at noopServiceWorkerMiddleware (D:\frontend\node_modules\react-dev-utils\noopServiceWorkerMiddleware.js:14:26)
at Layer.handle [as handle_request] (D:\frontend\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (D:\frontend\node_modules\express\lib\router\index.js:317:13)
at D:\frontend\node_modules\express\lib\router\index.js:284:7
at Function.process_params (D:\frontend\node_modules\express\lib\router\index.js:335:12)
at next (D:\frontend\node_modules\express\lib\router\index.js:275:10)
at launchEditorMiddleware (D:\frontend\node_modules\react-dev-utils\errorOverlayMiddleware.js:20:7)
at Layer.handle [as handle_request] (D:\frontend\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (D:\frontend\node_modules\express\lib\router\index.js:317:13)
at D:\frontend\node_modules\express\lib\router\index.js:284:7
at Function.process_params (D:\frontend\node_modules\express\lib\router\index.js:335:12)
at next (D:\frontend\node_modules\express\lib\router\index.js:275:10)
at handleWebpackInternalMiddleware (D:\frontend\node_modules\react-dev-utils\evalSourceMapMiddleware.js:42:7)
In the console, it says Compiled successfully.
Compiled successfully!
You can now view frontend in the browser.
Local: http://localhost:3000/
On Your Network: http://19x.xxx.xxx.xx:3000/
Note that the development build is not optimized.
To create a production build, use npm run build.
This is a Bug Report
Description
Creating test CLI application and the build crashed.
Compile a working build.
It was a standard CLI template config.
[ERR_INVALID_ARG_TYPE] The issue is related to the missing env.PWD. I think you should check if the PWD is undefined. I am not sure if the setting of PWD to be process.cwd() will work for all, but it should work for most. It is not related to the powershell as it bugs the same with CMD
Similar or dependent issues:
Additional Data