SnowdogApps / magento2-frontools

Set of front-end tools for Magento 2 based on Gulp.js
MIT License
430 stars 142 forks source link

Upgrade Frontools to at least Node 15 for new Macbook M1 Chip #415

Closed stefan1294 closed 3 years ago

stefan1294 commented 3 years ago

The new M1 Chip Macbook (Mac Sillicon) is not compatible with any Node version below 15. To use Node 12 you'll need to install (NPM Install) under a terminal which is being ran with Rosetta compatibility mode and a command prefix "arch -arm64e". Node 12 is being ran in some sort of compatibility mode which has a huge impact on the performance (speed-wise). A gulp styles takes at least "2.77" minutes. Gulp watch is initialising for 5 minutes at this moment.

I'm in no way a Node expert, but I'll try to see if I can figure out what needs to be changed to support Node >15.

Igloczek commented 3 years ago

We are not planing to use other versions than LTS, so the next planed version change will happen in 6 months, according to Node.js releases roadmap - https://nodejs.org/en/about/releases/

For now, we are officially supporting v14 and v12, so the active LTS and Maintenance LTS, till they get EoL.

What is the workaround you can use?

  1. Edit the engines section of package.json to match your needs (or just remove it).
  2. Run npm install or yarn to install dependencies and potentially update the package-lock.json / yarn.lock.

If this does not fix the issues, you will probably need to bump a version of some dependencies:

Remember to remove node_modules directory after changing Node.js version.