Skip to content

eslint-import-resolver-webpack broken for eslint-5 channel #426

@modosc

Description

@modosc

Bug Template

Actual Behavior

every file generates this error on build:

Error resolving webpackConfig { Error: Cannot find module 'webpack'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/code/webpack/config.dev.js:1:79)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3) code: 'MODULE_NOT_FOUND' }

and results in this new issue on every file:

Resolve error: Cannot find module 'webpack' NEW

Expected Behavior

this doesn't happen on the eslint-4 channel. i've updated the various eslint-* modules but eslint-import-resolver-webpack's version stayed the same

Steps to reproduce

our webpack/config.dev.js is:

const webpack = require('webpack')
const merge = require('webpack-merge')
const Dotenv = require('dotenv-webpack')
const { buildCommon } = require('./common')

module.exports = merge.smart(buildCommon({ cssSourceMaps: false }), {
  devtool: 'eval',
  output: {
    filename: '[name].js',
  },
  mode: 'development',
  optimization: {
    nodeEnv: process.env.BABEL_ENV || process.env.NODE_ENV || 'development',
  },
  plugins: [
    new Dotenv(),
    new webpack.HotModuleReplacementPlugin(),
    new webpack.LoaderOptionsPlugin({
      debug: true,
    }),
  ],
})

Relevant links

we are commercial customers - should i include a link to failed builds here?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions