webpack-contrib / jshint-loader

[DEPRECATED] jshint loader for webpack, please migrate on `eslint`
MIT License
67 stars 37 forks source link

Module build failed: Error: Cannot find module 'jshint' #52

Open dorianrod opened 6 years ago

dorianrod commented 6 years ago

Hello, I use webpack 3.8, and i can't use the given configuration as I have error "Module build failed: Error: Cannot find module 'jshint'". Nevertheless, the directory "jshint-loader" is in node_modules... Any ideas ? :)

The code I use:

module: { rules: [ { test: /.(jsx|js)$/, exclude: /node_modules/, use: [{ loader: 'babel-loader', options: { presets: ["es2017", "stage-0", "react", ], plugins: ["transform-decorators-legacy"] } }, { loader: 'jshint-loader' }] } Thanks, Dorian

GreenImp commented 5 years ago

I hit the same issue. I ran npm install jshint --save-dev and that resolved it.

However, then I hit the same issue as in #50 which doesn't appear to have a nice fix at present.