question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot add spartacus schematic with angular 10

See original GitHub issue

Describe the bug

ng add @spartacus/schematics fails with angular cli 10.0.2

To Reproduce

ng new project --style=scss --routing=false --packageManager=yarn
cd project
ng add @spartacus/schematics

Expected behavior

Can add schematic without any errors

Screenshots

% ng add @spartacus/schematics                                                                                                                                                             (git)-[master]-
Installing packages for tooling via yarn.
Installed packages for tooling via yarn.
            ✅️ Added '@spartacus/core' into dependencies
            ✅️ Added '@spartacus/storefront' into dependencies
            ✅️ Added '@spartacus/assets' into dependencies
            ✅️ Added '@spartacus/styles' into dependencies
            ✅️ Added '@ng-bootstrap/ng-bootstrap' into dependencies
            ✅️ Added '@ng-select/ng-select' into dependencies
            ✅️ Added '@ngrx/store' into dependencies
            ✅️ Added '@ngrx/effects' into dependencies
            ✅️ Added '@ngrx/router-store' into dependencies
            ✅️ Added 'bootstrap' into dependencies
            ✅️ Added 'i18next' into dependencies
            ✅️ Added 'i18next-xhr-backend' into dependencies
            ✅️ Added '@angular/service-worker' into dependencies
            ✅️ Added '@angular/localize' into dependencies
            ✅️ Added 'ngx-infinite-scroll' into dependencies
            🔍 Installing packages...
UPDATE package.json (1810 bytes)
UPDATE src/app/app.module.ts (871 bytes)
UPDATE src/styles.scss (117 bytes)
UPDATE src/app/app.component.html (32 bytes)
UPDATE src/polyfills.ts (3064 bytes)
Cannot find module '../package-manager/executor'
Require stack:
- /User/somebody/project/js-storefront/b2c/node_modules/@angular-devkit/schematics/tasks/node/index.js
- /User/somebody/project/js-storefront/b2c/node_modules/@angular-devkit/schematics/tools/workflow/node-workflow.js
- /User/somebody/project/js-storefront/b2c/node_modules/@angular-devkit/schematics/tools/index.js
- /User/somebody/project/js-storefront/b2c/node_modules/@angular/cli/utilities/json-schema.js
- /User/somebody/project/js-storefront/b2c/node_modules/@angular/cli/models/command-runner.js
- /User/somebody/project/js-storefront/b2c/node_modules/@angular/cli/lib/cli/index.js
- /User/somebody/.config/yarn/global/node_modules/@angular/cli/lib/init.js
- /User/somebody/.config/yarn/global/node_modules/@angular/cli/bin/ng

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

See discussion in Slack: https://spartacus-storefront.slack.com/archives/CD16V16FR/p1594718783142700

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mpern-sapcommented, Jul 14, 2020

FYI, the schematics works with @angular/cli@v9-lts

0reactions
znikolacommented, Jul 31, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

@spartacus/schematics - npm
Workflow for testing migrations. add Spartacus by running e.g. ng add @spartacus/schematics@<version> --baseUrl https://spartacus-demo.eastus.
Read more >
Unable to add asm schematic in Spartacus 3.2 - Stack Overflow
1 Answer 1 · you might have an older version of @spartacus/schematics installed: Please check in your package.json if you are have @spartacus/ ......
Read more >
Schematics - Spartacus Documentation - SAP
Spartacus schematics allow you to install Spartacus libraries in your project. ... You can add Spartacus core libraries and features to your Angular...
Read more >
Spartacus CookBook - Divante
This eBook was written for Spartacus version 4 and Angular version 12. ... 10. Spartacus CookBook - Tasty recipes for your SAP Commerce...
Read more >
Schematics for libraries - Angular
In your library's root folder, create a schematics folder. · In the schematics/ folder, create an ng-add folder for your first schematic. ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found