npm run dev SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
See original GitHub issueI followed the instruction and this is what I get using os: ubuntu 16.04 desktop.
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'run', 'dev' ]
2 info using npm@3.5.2
3 info using node@v4.2.6
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle ecampus@1.0.0~predev: ecampus@1.0.0
6 silly lifecycle ecampus@1.0.0~predev: no script for predev, continuing
7 info lifecycle ecampus@1.0.0~dev: ecampus@1.0.0
8 verbose lifecycle ecampus@1.0.0~dev: unsafe-perm in lifecycle true
9 verbose lifecycle ecampus@1.0.0~dev: PATH: /usr/share/npm/bin/node-gyp-bin:/opt/lampp/htdocs/ecampus/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
10 verbose lifecycle ecampus@1.0.0~dev: CWD: /opt/lampp/htdocs/ecampus
11 silly lifecycle ecampus@1.0.0~dev: Args: [ '-c',
11 silly lifecycle 'cross-env NODE_ENV=development webpack --watch --progress --hide-modules' ]
12 silly lifecycle ecampus@1.0.0~dev: Returned: code: 1 signal: null
13 info lifecycle ecampus@1.0.0~dev: Failed to exec dev script
14 verbose stack Error: ecampus@1.0.0 dev: `cross-env NODE_ENV=development webpack --watch --progress --hide-modules`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/share/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at EventEmitter.emit (events.js:172:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at ChildProcess.emit (events.js:172:7)
14 verbose stack at maybeClose (internal/child_process.js:821:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid ecampus@1.0.0
16 verbose cwd /opt/lampp/htdocs/ecampus
17 error Linux 4.4.0-57-generic
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "dev"
19 error node v4.2.6
20 error npm v3.5.2
21 error code ELIFECYCLE
22 error ecampus@1.0.0 dev: `cross-env NODE_ENV=development webpack --watch --progress --hide-modules`
22 error Exit status 1
23 error Failed at the ecampus@1.0.0 dev script 'cross-env NODE_ENV=development webpack --watch --progress --hide-modules'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the ecampus package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error cross-env NODE_ENV=development webpack --watch --progress --hide-modules
23 error You can get information on how to open an issue for this project with:
23 error npm bugs ecampus
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls ecampus
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
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. How to resolve this issue “ ...
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 >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 >Block-scoped declarations (let, const, function, class) not yet ...
Solved: SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For anyone having this issue with Homestead or similar environments, I was unable to get Node to upgrade using the typical instructions which are usually
That still wasn’t changing the version of Node that was being used. I finally found that you have change the /usr/bin/node symlink like this:
(Use whatever the highest version is in place of “<VERSION>” from your install options in /usr/local/n/versions/node.
@JeffreyWay in package.json, you can alert users who don’t meet minimum nodeJS requirement with…
(I’m not sure which version is required to run your package; I’m just guessing with 6.0)
You can set
engineStrict: true
if you want it to actually enforce it instead of just displaying a notice.