使用Spartacus中的原理图命令

发布于 2025-02-03 18:01:08 字数 973 浏览 2 评论 0原文

我正在尝试使用示意图命令“ NPX NG @spartacus/示意图:add-pwa”(由于版本与其他项目发生冲突,我不使用全局npm repo或Angular安装)。

我将获得以下输出:

The specified command ("@spartacus/schematics:add-pwa") is invalid. For a list of available options,
run "ng help".
Did you mean "analytics"?

ng cli命令工作正常,还添加 @spartacus/sthematics工作正常(npx ng add @spartacus/spartacus/schematics @最新),yarn build working forking forking forking(npx yarn build构建)。

如果我运行npx ng add @spartacus/schematics -ssr,这也可以正常工作,请再次提示我的功能,并将SSR添加到项目中。

我是否必须采取其他任何措施才能运行文档中提到的其他spartacus示意图命令( https://sap.github.io/spartacus-docs/schematics/#additional-commands-for-cormands-for-core-libraries-and-libraries-and-libraries-and-features )?

谢谢你! 克里斯蒂·C(Cristi C.)

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

时光倒影 2025-02-10 18:01:08

您是否尝试运行npx ng add @spartacus/示意图-PWA

Did you try to run npx ng add @spartacus/schematics --pwa?

旧故 2025-02-10 18:01:08

我找到了我问题的答案。这是我身边的错误。我试图打电话:

npx ng @spartacus/schematics:add-pwa

但是正确的电话是:

npx ng g @spartacus/schematics:add-pwa

以更多的关注阅读文档有帮助...

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...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文