Reputation: 13
I am trying to use the schematics command "npx ng @spartacus/schematics:add-pwa" (I am not using a global npm repo or angular installation, due to version conflicts with other projects).
I get the following output:
The specified command ("@spartacus/schematics:add-pwa") is invalid. For a list of available options,
run "ng help".
Did you mean "analytics"?
ng cli commands work fine, also adding @spartacus/schematics worked fine (npx ng add @spartacus/schematics@latest
), yarn build works fine (npx yarn build
).
If I run npx ng add @spartacus/schematics --ssr
, this also works fine, prompts me again for the features I want and adds SSR to the project.
Do I have to do anything else to be able to run the additional Spartacus Schematics commands as they are mentioned in the documentation (https://sap.github.io/spartacus-docs/schematics/#additional-commands-for-core-libraries-and-features)?
Thank you! Cristi C.
Upvotes: 0
Views: 197
Reputation: 13
I found the answer to my question. It was a mistake on my side. I was trying to call:
npx ng @spartacus/schematics:add-pwa
but the correct call is:
npx ng g @spartacus/schematics:add-pwa
Reading the documentation with more attention helps...
Upvotes: 0