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.

Lacking strict statements

See original GitHub issue

When I try the latest version 4.0.1, it returns the following error.

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:416: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> (C:\BuildAgent\work\756e6ea965fc640e\source\Dashboard\gulpfile.js:19:16)
     at Module._compile (module.js:409:26)
     at Object.Module._extensions..js (module.js:416:10)

It looks like some of your methods lack "use strict";

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
FreedCapybaracommented, Jul 16, 2018

To save somebody some time in figuring out how to fix VS, go to Tools > Options > Projects and Solutions > Web Package Management

There’s a version of node in $(VSINSTALLDIR)\Web\External, so I bumped up $(PATH) using the buttons in the top-right corner to override it. It worked 👍

Here’s my final configuration:

image

1reaction
D3MaxTcommented, Apr 17, 2018

@xzyfer Never mind. It was my bad. I was trying out the latest VS2017 preview, and forgot that, unlike my production installation, I haven’t pointed it to the latest version of node. You were right, it was in fact using older Node.

My bad.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing 'use strict' statement - JSLint Error Explanations
The "Missing 'use strict' statement" error is thrown when JSLint, JSHint and ESLint encounter a function that does not contain the strict mode...
Read more >
Missing "Use strict" statement - javascript - Stack Overflow
I am new to coding. I am receiving this error: "Missing "Use strict" statement" in my Javascript code. Here is my code: $(function(){...
Read more >
Strict mode - JavaScript - MDN Web Docs
JavaScript's strict mode is a way to opt in to a restricted variant of JavaScript, thereby implicitly opting-out of "sloppy mode".
Read more >
JavaScript "use strict" - W3Schools
The "use strict" directive was new in ECMAScript version 5. It is not a statement, but a literal expression, ignored by earlier versions...
Read more >
Mens Rea | Wex | US Law | LII / Legal Information Institute
This lack of a guilty mind would act as the fifth, and least blameworthy, of the possible mental states. For a strict liability...
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