Hey, try to add yarn package to your project package.json
Like:
"devDependencies": {
...
"yarn": "*"
}
And run:
npm install
Works for me.
Hey, I have problem with npm run dev when using less
I have fresh instalation of laravel
I changed my webpack.mix.js to this:
mix.js('resources/assets/js/app.js', 'public/js') .less('resources/assets/less/app.less', 'public/css');
then i run npm install and when u run npm run dev i get this error:
@ dev C:\Users\G3ORG3\Desktop\lol npm run development
@ development C:\Users\G3ORG3\Desktop\lol cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
Additional dependencies must be installed. This will only take a moment. 'yarn' is not recognized as an internal or external command, operable program or batch file. child_process.js:533 throw err; ^
Error: Command failed: yarn add less-loader less --save-dev 'yarn' is not recognized as an internal or external command, operable program or batch file.
at checkExecSyncError (child_process.js:490:13)
at execSync (child_process.js:530:13)
at Function.dependency (C:\Users\G3ORG3\Desktop\lol\node_modules\laravel-mix\src\Verify.js:107:13)
at Api.less (C:\Users\G3ORG3\Desktop\lol\node_modules\laravel-mix\src\Api.js:118:16)
at Object.<anonymous> (C:\Users\G3ORG3\Desktop\lol\webpack.mix.js:15:5)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\G3ORG3\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "development"
npm ERR! node v7.5.0
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! @ development: 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 @ development 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! Please include the following file with any support request: npm ERR! C:\Users\G3ORG3\Desktop\lol\npm-debug.log
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\G3ORG3\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "dev"
npm ERR! node v7.5.0
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! @ dev: npm run development
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script 'npm run development'.
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! npm run development
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! C:\Users\G3ORG3\Desktop\lol\npm-debug.log
pleaseeeee any help? thanks!!
Please or to participate in this conversation.