本地运行 Spartacus 的环境需求如下:
本地 Node.js 版本:12.18.3
从这个链接下载指定版本:
https://nodejs.org/download/release/v12.18.3/
在 /etc/profile 里配置环境变量:
yarn 版本:1.22.4
Angular 版本:12.0.5
npm install -g @angular/cli@12.0.5
运行 ng serve 命令时,由于我购买的阿里云 ECS 是 1 CPU / 2 GB 的配置,出现了垃圾回收:
报错:Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
更多Jerry的原创文章,尽在:“汪子熙”: