-
Notifications
You must be signed in to change notification settings - Fork 809
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
npm run dev fails on my 5.4 when configuring passport API Authentication #623
Comments
@Brayantezz |
Yep - we need the issue template filled out. |
Hi @JeffreyWay @ankurk91 Laravel Mix Version: 5.4.16 Description:When i run npm run dev, i'm receiving an error:
File node_modules/webpack/bin/webpack.js not exists. Path node_modules/webpack not exists as well. Steps To Reproduce:Clean laravel instalation, then:
Solution:@Brayantezz |
Confirm, Just tried with:
Produce this error > racecloud-devDependencies@ dev /home/ankurk/projects/race-cloud
> node node_modules/cross-env/dist/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
/home/ankurk/projects/race-cloud/node_modules/laravel-mix/setup/webpack.config.js:1
(function (exports, require, module, __filename, __dirname) { let path = require('path');
^^^
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 requireConfig (/home/ankurk/projects/race-cloud/node_modules/webpack/bin/convert-argv.js:96:18)
at /home/ankurk/projects/race-cloud/node_modules/webpack/bin/convert-argv.js:109:17
at Array.forEach (native)
npm ERR! Linux 4.4.0-57-generic
npm ERR! argv "/home/ankurk/.nvm/versions/node/v4.8.1/bin/node" "/home/ankurk/.nvm/versions/node/v4.8.1/bin/npm" "run" "dev"
npm ERR! node v4.8.1
npm ERR! npm v2.15.11
npm ERR! code ELIFECYCLE
npm ERR! racecloud-devDependencies@ dev: `node node_modules/cross-env/dist/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 racecloud-devDependencies@ dev script 'node node_modules/cross-env/dist/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! This is most likely a problem with the racecloud-devDependencies 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/dist/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 racecloud-devDependencies
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls racecloud-devDependencies
npm ERR! There is likely additional logging output above.
@JeffreyWay "engines": {
"node": ">=6.10.1",
"npm": ">=3.10.10"
},
"engineStrict": true, This way npm will refuse to install P.S. |
i did a fresh installation of laravel updated my node and npm and all worked fine,followed these steps
|
Thanks, it works!. @Brayantezz |
Tried @Brayantezz method but didn't worked. I fixed it by requiring webpack in my local package.json file. Even though I had it installed globally. |
@jrmorales can you post a sample of the require in package.json? |
I gotta say @JeffreyWay I found gulp to be way easier. I'm having a hell of a time getting mix to work, |
@dk4210 Then use Gulp. Or, create a new issue and explain what specifically you're having trouble with. It's almost always related to a faulty install. |
Do you have a tutorial on how to switch to gulp? Forgive me I'm just a beginner. |
@JeffreyWay this is my error and log if that helps. PS C:\xampp\htdocs\automation_team> npm run dev
npm WARN invalid config loglevel="notice"
C:\xampp\htdocs\automation_team\node_modules\laravel-mix\setup\webpack.config.js:24 SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode npm ERR! A complete log of this run can be found in: npm ERR! A complete log of this run can be found in: -----------------------------------Log File ------------------------------------------------------------ 0 info it worked if it ends with ok Thanks, |
Hey, Dan - Please create a new GitHub issue and fill out the template so that we can help. I can't offer any ideas without knowing what version of Mix you have installed, and what your webpack.mix.js file looks like. But based on this block-scope error you're seeing here:
I'm thinking you have an ancient version of Node installed. |
I had this issue i did the following steps and i have no issues anymore:
My details:
|
Hi @JeffreyWay I think it may be best if I can just convert over to gulp. Everything I've tried wont work. I even followed @hassanazimi instructions but still no luck. I updated my node to version 6.11.1 I need to compile my css files but can't. |
what error are you getting @dk4210 ? I can see your node version is old. |
Upgraded to 6.11.1
Thanks!
…On Jul 13, 2017 2:05 PM, "Amir Hassan Azimi" ***@***.***> wrote:
what error are you getting @dk4210 <https://github.com/dk4210> ? I can
see your node version is old.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#623 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABGELpT-wdhbAlmZtjmM3xS404TCph6dks5sNlxsgaJpZM4Mp8d6>
.
|
You probably need node 8 for some of these new loaders to work. |
I got this problem too. My node version is 6.9.1 and npm is 3.10.8 with Windows OS 64-bit. I notice that cross-env is required for running the laravel-mix |
@korneliuskristianr
Only for Windows so far. Mac and Linux works fine without. |
I had the same issue as @Brayantezz. I updated to the latest node version and it fixed all the problems. |
It would be super sweet if the Laravel docs had a min version requirement for node/npm. Updating these solved my problem too. Maybe it does and I'm just missing it? |
@hassanazimi sol'n worked for me. thanks, mate. |
Cheers mate, that worked |
$ npm run dev
The system cannot find the path specified.
events.js:160
throw er; // Unhandled 'error' event
^
Error: spawn node_modules/webpack/bin/webpack.js ENOENT
at notFoundError (C:\xampp\htdocs\TocApp\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (C:\xampp\htdocs\TocApp\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (C:\xampp\htdocs\TocApp\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev:
cross-env 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 'cross-env 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! cross-env 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! A complete log of this run can be found in:
npm ERR! C:\Users\BRAYAN\AppData\Roaming\npm-cache_logs\2017-03-27T08_28_13_634Z-debug.log
The text was updated successfully, but these errors were encountered: