Module not found: Error: Cannot resolve module

I’m probably missing a configuration property, but this is what I’m getting when trying to build. It happens only when I try to import the expect library.

Error in .//tmatch/index.js
Module not found: Error: Cannot resolve module ‘\\dev\node_modules\process\browser.js’ in M:\dev\node_modules\tmatch @ ./
/tmatch/index.js 1:0-89

My webpack.config.js:

module.exports = {
  entry: './src/app.js',
  output: {
    path: __dirname + '/build',
    filename: 'app.bundle.js'
  module: {
    loaders: [{
      loader: 'babel-loader',
      test: /\.js$/,
      exclude: /node_modules/,
      query: {
        presets: ['es2015']

Author: Fantashit

2 thoughts on “Module not found: Error: Cannot resolve module

  1. Huh that is bizarre, looks like it is setup correctly. Since you are using ES6, maybe consider using the webpack 2 beta, since it seems to handle those statements a bit better natively, and the resolve setup is a little easier. I’m not sure if this will fix your issue but it might be worth a try. Here is a list of the changes in webpack 2 And here is a snip of how my webpack 2 resolve is setup:

    resolve: {
            modules: [path.resolve(__dirname, '/src'), 'node_modules/'],
            descriptionFiles: ['package.json'],
            extensions : ['', '.js', '.ts']
  2. This dependency was not found:
    * module in (webpack)/lib/NormalModule.js, (webpack)/lib/node/NodeTargetPlugin.js
    To install it, you can run: npm install --save module

    This happened because VScode autocomplete import with import { debug } from "webpack"; when I typing debugger.

Comments are closed.