question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

See original GitHub issue

Getting the below error when updating to 4.0.1, which required Node.js 6.0.0

Failed to run "Gulpfile.js"...
cmd.exe /c gulp --tasks-simple
\node_modules\gulp-sass\index.js:66
    let sassMap;
    ^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:404:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (gulpfile.js:12:16)
    at Module._compile (module.js:397:26)
    at Object.Module._extensions..js (module.js:404:10)

I understand that you’ve dropped the 'use strict'; decleration, but is it really worth it considering this will force people to update Node.js for the sake of a few characters? (updating Node.js is a bit of a pita in some IDE’s such as VIsual Studio). I’ve not come across any other package that has taken his approach.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
kwoottencommented, Aug 2, 2018

Installed node 6, and set IDE to use the system install and all works now, so thanks for update

0reactions
xzyfercommented, May 15, 2018

As I said, node 6 should work. Your editor it probably configured to use VS’ embedded node version.

On Tue., 15 May 2018, 9:01 pm Dale Mckeown, notifications@github.com wrote:

Yeah, if only Node v8.11.1 would play nicely.

npm/npm#20633 https://github.com/npm/npm/issues/20633

I’ll probably revert to the standard Node/NPM versions in VS2017 and go back to 3.1.0 on this package.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/dlmanning/gulp-sass/issues/692#issuecomment-389277545, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjZWB2bwYGY6WBY4Kvqp4vx6bGM3YTbks5tyyYegaJpZM4T_cW5 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Block-scoped declarations (let, const, function, class) not yet ...
Error “Block-scoped declarations not yet supported outside strict mode” comes while you want to do build your app. It usually comes when you...
Read more >
Block-scoped declarations not yet supported outside strict mode
I've installed all the npm dependencies with npm install command. That didn't produce any errors. In my webpack.min.js file I have: const {...
Read more >
Block-scoped declarations (let, const, function, class) not yet ...
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode #245.
Read more >
Uncaught SyntaxError: Block-scoped declarations (let, const ...
The reason is let keyword is not allowed in non-strict mode for this version of Chrome. The better solution is to add "use...
Read more >
Block-scoped declarations (let, const ... - Google Groups
"SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode". While if use older versions, nothing will ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found