头图

Follow the steps in this link to install.

Create a new Angular application, name mystore , after all packages are installed:

ng new mystore --style=scss

Go to the mystore folder and use the command line: ng add @spartacus/schematics@3.4

Encountered the error message:

Cannot find module '@angular-devkit/core/src/terminal'

The reason was that I was using an overly high version of Node.js, as shown in the message above:

'ng' is not recognized as an internal or external command,
operable program or batch file.

After downloading Node.js 14 from the Node.js official website, reinstall Angular CLI 12 in the Node.js 14 directory:

npm install -g @angular/cli@12.2.5

Then install Spartacus using Schematics:

Encountered new error message:

The Angular CLI requires a minimum Node.js version of either v12.14 or v14.15.

Cannot find module '@angular-devkit/core/src/terminal'

I use the local installation method, that is, do not use the -g option. In this way, after the installation is complete, click ng version in the folder, and the version 10 is displayed.

From the print message, confirm that the v10 version is now in use.

Everything works fine now:

in conclusion

Spartacus 3.4 only works with Angular CLI 10.

In keeping with its commitment to upgradability, Spartacus' design pattern is to build non-core functionality as a library of functionality that adds or changes the provided functionality ( feature libraries ).

When using Spartacus, the developer builds an Angular application to extract the Spartacus library, which contains the core resources required to use SAP Commerce Cloud. Developers can then build new features that include any custom features and pages.

The content of Spartacus pages is obtained from the SAP Commerce Cloud CMS (Content Management System), such as logos, links, banners and static pages. SAP recommends that new content-driven features follow the same pattern to enable content administrators to modify page content through CMS tools.

partacus is also being updated to work perfectly with the upcoming release of SAP Commerce Cloud.


注销
1k 声望1.6k 粉丝

invalid