I updated the email template stack to support Node v16 and many packages to the latest versions. While testing, I noticed it works fine with Node v14, v16 and v18, but I couldn't compile the project with Node v10. So, I started from scratch to find which package caused this problem because I did not want to submit a PR that would create a breaking change.
I was surprised to discover that I couldn't compile the fresh cloned project from the official repository with Node v10, even though it is clearly written in the Getting Started section:
"To use the stack, you'll need Node.js no greater than version 10 installed on your machine."
I am getting errors with Node v10 on all my machines (two Macs and one Linux). I also tried at least 3 different versions of Node (10.24.1, 10.22.1, 10.13.0).
Cloning and installing Node modules goes fine:
❯ git clone https://github.com/foundation/foundation-emails-template test
...
❯ cd test
...
❯ nvm use v10
Now using node v10.24.1 (npm v6.14.12)
❯ npm install
...
But I am getting the error as soon as try to run it
❯ npm start
...
var self = dartNodeIsActuallyNode ? Object.create(globalThis) : globalThis;
^
ReferenceError: globalThis is not defined
at Object.exports.load (/Users/viking/Documents/Work/Newsletters/test/node_modules/sass/sass.dart.js:6:51)
at Object.<anonymous> (/Users/viking/Documents/Work/Newsletters/test/node_modules/sass/sass.default.js:2:9)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/viking/Documents/Work/Newsletters/test/node_modules/babel-register/lib/node.js:152:7)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
I kindly ask @joeworkman to state which node versions are officially supported.
EDIT 2: I intentionally separated the pull request for new node version support foundation/foundation-emails-template#71 from the one that restores the node 10 support. If only v12+ should be supported, everything is in this pull request. If v10 should be supported, too, then foundation/foundation-emails-template#70 should be merged too
I also tried to use a fresh install of foundation-cli (which is deprecated as far as I know), hoping it would give me a working version, which I could use as a starting point for my update didn't work either.
Installation works
❯ npm install foundation-cli --global
But as soon as I try to create a project, I get the error:
❯ foundation new --framework emails
/Users/viking/.nvm/versions/node/v10.24.1/lib/node_modules/foundation-cli/node_modules/string-kit/lib/unicode.js:237
return emojiWidthLookup.get( code ) ?? 2 ;
Since this is deprecated and doesn't work, it should probably be removed from the documentation.
EDIT: I just tested foundation-cli with Node v12 and v14. With v12, it throws the same error as with v10. With v14 it partially works. You can create a project, but you must run yarn or npm install to install the required Node modules.
I really need to know what are officially supported node versions, so I can make a proper PR request, which will solve all those issues: #1113 #1120 #1124 #1127 #1129
Important note: You can use the official repo with Node v14.
I updated the email template stack to support Node v16 and many packages to the latest versions. While testing, I noticed it works fine with Node v14, v16 and v18, but I couldn't compile the project with Node v10. So, I started from scratch to find which package caused this problem because I did not want to submit a PR that would create a breaking change.
I was surprised to discover that I couldn't compile the fresh cloned project from the official repository with Node v10, even though it is clearly written in the Getting Started section:
"To use the stack, you'll need Node.js no greater than version 10 installed on your machine."I am getting errors with Node v10 on all my machines (two Macs and one Linux). I also tried at least 3 different versions of Node (10.24.1, 10.22.1, 10.13.0).
Cloning and installing Node modules goes fine:
But I am getting the error as soon as try to run it
I kindly ask @joeworkman to state which node versions are officially supported.
EDIT 2: I intentionally separated the pull request for new node version support foundation/foundation-emails-template#71 from the one that restores the node 10 support. If only v12+ should be supported, everything is in this pull request. If v10 should be supported, too, then foundation/foundation-emails-template#70 should be merged too
I also tried to use a fresh install of foundation-cli (which is deprecated as far as I know), hoping it would give me a working version, which I could use as a starting point for my update didn't work either.
Installation works
But as soon as I try to create a project, I get the error:
Since this is deprecated and doesn't work, it should probably be removed from the documentation.
EDIT: I just tested foundation-cli with Node v12 and v14. With v12, it throws the same error as with v10. With v14 it partially works. You can create a project, but you must run yarn or npm install to install the required Node modules.
I really need to know what are officially supported node versions, so I can make a proper PR request, which will solve all those issues: #1113 #1120 #1124 #1127 #1129
Important note: You can use the official repo with Node v14.