foundation / foundation-emails

Quickly create responsive HTML emails that work on any device and client. Even Outlook.
https://get.foundation/emails/docs/
MIT License
7.77k stars 1.09k forks source link

Feature request - Support latest nodeJS versions #1113

Open ItamarGronich opened 2 years ago

ItamarGronich commented 2 years ago

Desired behavior

Foundation runs on latest node versions (16, 17)

Current behavior

Foundation runs on node version no greater than 10.

This raised a question

Why does the docs say that foundation doesn't support node > 10? Version 2.4.0 now uses dart sass instead of node-sass so there should be less tight coupling with a specific node version. The only thing i can think of that might be the xmlbuilder package used by gulp-litmus because it specifies an engine field not compatible.

image
justingit commented 2 years ago

This issue is leaving Foundation for Emails dead in the water. I have to drag an old limping laptop out whenever I need to build something.

ItamarGronich commented 2 years ago

Yes, this makes foundation unusable in the new apple silicon macbooks.

tnog commented 2 years ago

To get around this for the time being you can use NVM to install and use different versions of node as needed: https://github.com/nvm-sh/nvm

On Mac OS see: https://dev-yakuza.posstree.com/en/environment/nvm/ for install and configuration using Homebrew

justingit commented 2 years ago

Can anyone confirm v10 can be installed using nvm on an M1 mac? Fails for me at least.

tnog commented 2 years ago
Screen Shot 2022-04-25 at 2 27 20 PM
justingit commented 2 years ago

Appreciate the check, @tnog. Must be an issue in my environment. I will investigate further.

justin@m1 ~ % nvm install 10.24.1 

# build verbosity and other errors, including, 

../deps/openssl/config/archs/linux-x86_64/asm_avx2/crypto/aes/aesni-x86_64.s:4474:8: error: invalid alignment value
.align 64
       ^
make[1]: *** [/Users/justin/.nvm/.cache/src/node-v10.24.1/files/out/Release/obj.target/openssl/deps/openssl/config/archs/linux-x86_64/asm_avx2/crypto/aes/aesni-x86_64.o] Error 1
rm c0b1278d8e592e490c896cac3f2c38b439c8a5d3.intermediate
make: *** [node] Error 2
nvm: install v10.24.1 failed!
justin@m1 ~ % 
ItamarGronich commented 2 years ago

To get around this for the time being you can use NVM to install and use different versions of node as needed: nvm-sh/nvm

On Mac OS see: dev-yakuza.posstree.com/en/environment/nvm for install and configuration using Homebrew

@tnog This is a feature request for upgrading foundation to work on the latest node versions. It's not a bug - I have no actual problem with running foundation as i'm already using NVM to set node to the required version for foundation.

However, I would like to upgrade node to the latest release since the older 10.x versions are now end of life and no longer maintained. So, if foundation is to be a product used in production it has to upgrade to maintain the necessary level of security.

Also, to make node < 16 work on m1 macs you have to use rosetta otherwise only node >= 16 works natively on m1 since it was the first release to compile to darwin-arm64 target. node < 16 only compiled to darwin-64 (intel chips).

tnog commented 2 years ago

@ItamarGronich that's clearly understood. Was responding to users like @justingit who weren't aware of workaround.

tataue commented 2 years ago

Can anyone confirm v10 can be installed using nvm on an M1 mac? Fails for me at least.

not okay. tested.

boreyko1 commented 2 years ago

Can anyone confirm v10 can be installed using nvm on an M1 mac? Fails for me at least.

Works fine using https://github.com/tj/n and node@10.24.1

justingit commented 2 years ago

n looks promising, I'm still having problems with the openssl dep,

../deps/openssl/config/archs/linux-x86_64/asm_avx2/crypto/aes/aesni-mb-x86_64.s:6:1: error: unknown directive
.type aesni_multi_cbc_encrypt,@function
ItamarGronich commented 2 years ago

I'm sorry for being that guy but this discussion is off topic. Wether node 10 can or can not be installed on M1 macs is off topic.

This is a feature request for foundation to upgrade to latest node versions.

wegnertm commented 2 years ago

Can we please get something on the requirements/installation instructions! I just wasted hours trying to get my emails to compile not knowing I shouldn't have updated my node version. Extremely frustrating.

viking1304 commented 2 years ago

Can we please get something on the requirements/installation instructions! I just wasted hours trying to get my emails to compile not knowing I shouldn't have updated my node version. Extremely frustrating.

EDIT: The instructions on the web page https://get.foundation/emails/docs/sass-guide.html are not good and should be ignored, so I removed my original answer.

I just wrote a proper answer in another thread (with updated information that I didn't have when I wrote my previous answer): https://github.com/foundation/foundation-emails/issues/1129#issuecomment-1314059792