Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for node v10 #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

viking1304
Copy link

Fix to make it work on node v10 again

@viking1304
Copy link
Author

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

> foundation-emails-template@2.4.0 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
 ---------------------------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant