webpack error in Cannot find module 'less' -


i'm trying use less loader in webpack , issues - i've installed less loader locally, when try compile using webpack command in bask, prints out: "error in cannot find module 'less'". in entry point require less file

require("./less_components/style.less"); 

here webpack.config file

module.exports = {  entry: "./entry.js",  output: {      path: "./build",      filename: "./bundle.js"  },  module: {      loaders: [          {test: /\.js$/, exlude: /node_modules/, loader: "babel-loader"},          {test: /\.less$/, loader: "style!css!less"}      ] } } 

what's matter , how should fix it?

it sounds haven't installed less-loader node_modules. installing fix this.

npm install less-loader --save-dev 

edit: error when haven't installed css-loader , style-loader chaining less-loader to.

anyone comes across can plus on issue submitted bad message. https://github.com/webpack/less-loader/issues/89


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -