node -v): 8.11:4npm -v): 6.4.1I have only js, less and Vue files in application but still error occurs that missing 'sass' dependencies. I have no sass in webpack.mix.js and also in the project.
After I install sass and sass-loader everything working fine. But it is strange I must install this even if I dont use them. Maybe it is bug so I report it. :)
I have one more project where I acctualy use sass and there was upgrade so simple. Great job.
Commit 8a8aa5a did not fix this.
Recently upgraded to v4:
npm remove laravel-mix
npm install laravel-mix@^4.0.0
npm install cross-env@^5.1.6
When running npm run dev it stops because it can't find the sass module.
> Error: Cannot find module 'sass'
webpack.mix.js file:
const mix = require('laravel-mix');
mix.less('resources/assets/client/app.less', 'public/builds-css/client.css');
mix.less('resources/assets/admin/app.less', 'public/builds-css/admin.css');
mix.less('resources/assets/main/app.less', 'public/builds-css/app.css');
mix.js('resources/assets/admin/app.js', 'public/builds-js/admin.js');
mix.js('resources/assets/main/app.js', 'public/builds-js/app.js');
mix.disableSuccessNotifications();
if (mix.inProduction()) {
mix.options({ clearConsole: false, processCssUrls: false });
mix.sourceMaps().version();
}
package.json file:
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"cross-env": "^5.1.6",
"laravel-mix": "^4.0.0",
"less": "^3.9.0",
"less-loader": "^4.1.0"
},
"dependencies": {}
}
@JeffreyWay
@JeffreyWay can we have this fixed? Thank you!
I'm also having this same issue. I've worked around it by just installing sass in my project, installing sass-loader wasn't even necessary.
Most helpful comment
Commit 8a8aa5a did not fix this.
Recently upgraded to v4:
When running
npm run devit stops because it can't find the sass module.webpack.mix.jsfile:package.jsonfile:@JeffreyWay