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
npx nx g @nx/angular:component add-to-cart --project=frontend --path=apps/frontend/src/app/UI/purchase --flat --inline-style --module=catalog --dry-run --verbose
> NX Generating @nx/angular:component
> NX The "path" argument must be of type string. Received null
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null
at new NodeError (node:internal/errors:405:5)
at validateString (node:internal/validators:162:11)
at dirname (node:path:1275:5)
at addToNgModule (/Users/aitor/Documents/workspace/sammicweb-ws/node_modules/@nx/angular/src/generators/utils/find-module.js:49:91)
at componentGenerator (/Users/aitor/Documents/workspace/sammicweb-ws/node_modules/@nx/angular/src/generators/component/component.js:42:35)
at /Users/aitor/Documents/workspace/sammicweb-ws/node_modules/nx/src/command-line/generate/generate.js:248:32
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async handleErrors (/Users/aitor/Documents/workspace/sammicweb-ws/node_modules/nx/src/utils/params.js:9:16)
at async Object.handler (/Users/aitor/Documents/workspace/sammicweb-ws/node_modules/nx/src/command-line/generate/command-object.js:13:22)
Expected Behavior
Component should be generated. I actually put the 'path' parameter in the command
I ran into a similar issue but I think this works as intended, the error message is just not very informing and the argument name of "module" is a bit deceiving. According to the documentation you need to add the filename or path to the NgModule not the the name of the exported Module. Which worked when provided with the correct path.
Current Behavior
Trying to generate a component I get this error:
Expected Behavior
Component should be generated. I actually put the 'path' parameter in the command
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: