You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating test CLI application and the build crashed.
What did you expect should have happened?
Compile a working build.
What was the config (if any) you used?
It was a standard CLI template config.
What stacktrace or error message did you see?
[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
Which version of node and npm are you using?: 17.5.0 and 8.5.4
Operating System: Windows 10 64
Stack Trace:
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 KopytkorcReader._getAbsolutePath (C:\Framework\test-framework\node_modules\@dazn\kopytko-packager\src\env\kopytkorc-reader.js:149:17)
at KopytkorcReader._getKopytkorcConfig (C:\Framework\test-framework\node_modules\@dazn\kopytko-packager\src\env\kopytkorc-reader.js:110:32)
at new KopytkorcReader (C:\Framework\test-framework\node_modules\@dazn\kopytko-packager\src\env\kopytkorc-reader.js:16:28)
at Object.<anonymous> (C:\Framework\test-framework\node_modules\@dazn\kopytko-packager\src\env\kopytko-config.js:6:19)
at Module._compile (node:internal/modules/cjs/loader:1097:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1151:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Framework\test-framework\node_modules\@dazn\kopytko-packager\src\core\plugins.js:3:44)
at Module._compile (node:internal/modules/cjs/loader:1097:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1151:10) {
code: 'ERR_INVALID_ARG_TYPE'
}
Provider Error messages:
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: