foundation-emails-template
foundation-emails-template copied to clipboard
Fix for node v10
Fix to make it work on node v10 again
The current version doesn't work with node v10.
❯ nvm use v10 Now using node v10.24.1 (npm v6.14.12)
Installation works
❯ npm install
...
but there is an error on run
❯ 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)
With this fix, it normally works with node 10 again.
❯ npm start
> [email protected] start /Users/viking/Documents/Work/Newsletters/fet-test/test10f
> gulp
[10:26:05] Failed to load external module @babel/register
[10:26:05] Requiring external module babel-register
[10:26:06] Using gulpfile ~/Documents/Work/Newsletters/fet-test/test10f/gulpfile.babel.js
[10:26:06] Starting 'default'...
[10:26:06] Starting 'build'...
[10:26:06] Starting 'clean'...
[10:26:06] Finished 'clean' after 1.48 ms
[10:26:06] Starting 'pages'...
[10:26:06] Finished 'pages' after 356 ms
[10:26:06] Starting 'sass'...
[10:26:07] Finished 'sass' after 654 ms
[10:26:07] Starting 'images'...
[10:26:07] gulp-imagemin: Minified 0 images
[10:26:07] Finished 'images' after 105 ms
[10:26:07] Starting 'inline'...
[10:26:08] Finished 'inline' after 500 ms
[10:26:08] Finished 'build' after 1.62 s
[10:26:08] Starting 'server'...
[10:26:08] Finished 'server' after 25 ms
[10:26:08] Starting 'watch'...
[Browsersync] Access URLs:
---------------------------------------
Local: http://localhost:3000
External: http://192.168.29.233:3000
---------------------------------------
UI: http://localhost:3001
UI External: http://localhost:3001
---------------------------------------