foundation-emails icon indicating copy to clipboard operation
foundation-emails copied to clipboard

Feature request - Support latest nodeJS versions

Open ItamarGronich opened this issue 2 years ago • 14 comments

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

ItamarGronich avatar Apr 18 '22 13:04 ItamarGronich

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.

justingit avatar Apr 18 '22 15:04 justingit

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

ItamarGronich avatar Apr 19 '22 07:04 ItamarGronich

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

tnog avatar Apr 25 '22 19:04 tnog

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

justingit avatar Apr 25 '22 20:04 justingit

Screen Shot 2022-04-25 at 2 27 20 PM

tnog avatar Apr 25 '22 21:04 tnog

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 ~ % 

justingit avatar Apr 25 '22 23:04 justingit

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).

ItamarGronich avatar Apr 28 '22 06:04 ItamarGronich

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

tnog avatar Apr 28 '22 18:04 tnog

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

not okay. tested.

tataue avatar May 24 '22 03:05 tataue

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 [email protected]

boreyko1 avatar May 30 '22 14:05 boreyko1

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

justingit avatar May 30 '22 18:05 justingit

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.

ItamarGronich avatar May 31 '22 08:05 ItamarGronich

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.

wegnertm avatar Nov 01 '22 15:11 wegnertm

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

viking1304 avatar Nov 14 '22 15:11 viking1304