font-awesome-webpack
font-awesome-webpack copied to clipboard
Module build failed: Error: Cannot find module 'less'
in ./node_modules/.0.26.4@css-loader!./node_modules/.2.2.3@less-loader!./node_modules/.0.0.5-beta.2@font-awesome-webpack/font-awesome-styles.loader.js!./node_modules/.0.0.5-beta.2@font-awesome-webpack/font-awesome.config.js
Module build failed: Error: Cannot find module 'less'
@ ./node_modules/.0.13.2@style-loader!./node_modules/.0.26.4@css-loader!./node_modules/.2.2.3@less-loader!./node_modules/.0.0.5-beta.2@font-awesome-webpack/font-awesome-styles.loader.js!./node_modules/.0.0.5-beta.2@font-awesome-webpack/font-awesome.config.js 4:14-145 13:2-17:4 14:20-151
@ ./node_modules/.0.0.5-beta.2@font-awesome-webpack/index.js
@ ./node_modules/.7.1.2@babel-loader/lib!./node_modules/.13.5.0@vue-loader/lib/selector.js?type=script&index=0&bustCache!./src/components/Personal.vue
@ ./src/components/Personal.vue
@ ./src/router/index.js
@ ./src/main.js
@ multi ./build/dev-client ./src/main.js
I had the same problem and resolved it by installing the following packages
less url-loader file-loader
@Nogbit thanks for your advice! i will try it!
Same problem. Shouldn't the less module be a dependancy as it doesn't seem to work without it?
@JamesJefferyUK
I don't think so as less
isn't a direct dependency of font-awesome-webpack
, but a peer dependency of less-loader
(see package.json), which is itself a dependency of font-awesome-webpack
(see package.json).
So it's up to the less-loader
package to make it a normal dependency if needed, but they decided not to (see https://github.com/webpack-contrib/less-loader/pull/62#issuecomment-159414140).
More on peer dependencies in this good article: https://lexi-lambda.github.io/blog/2016/08/24/understanding-the-npm-dependency-model/
I had the same problem and resolved it by installing the following packages
less url-loader file-loader
I know the topic is kinda old but I had a recent problem with less-loader and webpack and this is exactly what I needed ! Thank you