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.

npm run dev fails on fresh 5.4 install

See original GitHub issue

I encountered this on a fresh 5.4 install.

Jordans-MacBook-Pro:Mix jordandalton$ npm run dev

> @ dev /Users/jordandalton/Code/Projects/Mix
> node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

/Users/jordandalton/Code/Projects/Mix/node_modules/laravel-mix/setup/webpack.config.js:120
        let extractPlugin = new plugins.ExtractTextPlugin(
        ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:54:16)
    at Module._compile (module.js:375:25)
    at Object.Module._extensions..js (module.js:406:10)
    at Module.load (module.js:345:32)
    at Function.Module._load (module.js:302:12)
    at Module.require (module.js:355:17)
    at require (internal/module.js:13:17)
    at requireConfig (/Users/jordandalton/Code/Projects/Mix/node_modules/webpack/bin/convert-argv.js:96:18)
    at /Users/jordandalton/Code/Projects/Mix/node_modules/webpack/bin/convert-argv.js:109:17
    at Array.forEach (native)

npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
npm ERR! node v5.2.0
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! @ dev: `node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ dev script 'node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls 
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jordandalton/Code/Projects/Mix/npm-debug.log

So I tried updating laravel-mix to 0.5.9 but no luck. Also updated node and npm to latest versions…no luck as well.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:17

github_iconTop GitHub Comments

5reactions
harryhan24commented, May 6, 2017

@AttaUrRehman24 100%? no absolutely not

4reactions
JeffreyWaycommented, Jan 29, 2017

Upgrade Node.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm run dev fails on fresh 5.4 install · Issue #227 - GitHub
I encountered this on a fresh 5.4 install. ... So I tried updating laravel-mix to 0.5.9 but no luck. Also updated node and...
Read more >
running npm run dev results in error in new laravel 5.4 ...
Running npm run dev on a new laravel 5.4 installation results in the following error. Need help to figure out how to get...
Read more >
npm run dev error - fresh install - Laracasts
Hi everyone, I'm running a completely fresh install of laravel 5.4.33, have changed no configs or anything (everything default), and the only commands...
Read more >
How To Fix “Laravel Mix NPM run dev error” - YouTube
This video will help you to solve the annoying “Laravel Mix NPM run dev error ” that you probably have seen before when...
Read more >
Webpack - npm
Start using webpack in your project by running `npm i webpack`. ... Install. Install with npm: npm install --save-dev webpack.
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