Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find module "." at webpackMissingModule

Tags:

webpack

This is the error I'm getting:

Cannot find module "." at webpackMissingModule

This is my webpack.config.js file. How can I find out which line is causing the error? If it is not webpack.config.js that is causing it, may I know what else I should be checking?

module.exports = [
  {
    entry: {
      core: './node_modules/core-js/client/shim.min.js',
      zone: './node_modules/zone.js/dist/zone.js',
      reflect: './node_modules/reflect-metadata/Reflect.js',
      system: './node_modules/systemjs/dist/system.src.js'
    },
    output: {
      filename: './wwwroot/js/[name].js'
    },
    target: 'web',
    node: {
      fs: "empty"
    }
  },
  {
    entry: {
      app: './wwwroot/app/main.ts',
      developerlist: './wwwroot/app/developerlist.bootstrap.ts',
      rating: './wwwroot/app/rating.bootstrap.ts'
    },
    output: {
      filename: './wwwroot/js/[name].js'
    },
    devtool: 'source-map',
    resolve: {
      extensions: ['.webpack.js', '.web.js', '.ts', '.js']
    },
    module: {
      loaders: [
        { test: /\.ts$/, loader: 'ts-loader' }
      ]
    }
  }];

console.trace:

(anonymous) @ VM214:1
webpackMissingModule @ system.js:6179
SystemJSLoader$1 @ system.js:6179
(anonymous) @ system.js:6299
(anonymous) @ system.js:6308
(anonymous) @ system.js:6311
__webpack_require__ @ system.js:20
(anonymous) @ system.js:66
(anonymous) @ system.js:69
VM215:1 console.trace

Error: Cannot find module "." at webpackMissingModule (http://localhost:5000/js/system.js:6179:67) [] at new SystemJSLoader$1 (http://localhost:5000/js/system.js:6179:145) [] at http://localhost:5000/js/system.js:6299:14 [] at Object. (http://localhost:5000/js/system.js:6308:2) [] at Object. (http://localhost:5000/js/system.js:6311:30) [] at webpack_require (http://localhost:5000/js/system.js:20:30) [] at http://localhost:5000/js/system.js:66:18 [] at http://localhost:5000/js/system.js:69:10 [] code: "MODULE_NOT_FOUND"

like image 610
Jonas Arcangel Avatar asked Sep 08 '25 11:09

Jonas Arcangel


2 Answers

Have you tried getting rid of System.js? webpack can do all that System.js can do, there's no point in using a module bundler to bundle a module bundler.

like image 168
Patrick Hund Avatar answered Sep 12 '25 03:09

Patrick Hund


My issue was related to react-hot-loader it seems like there is an issue with react router v4, I updated to latest version (a beta version at this time) and it fixed the error

"react-hot-loader": "^3.0.0-beta.7"

by doing a

npm install --save-dev react-hot-loader@next
like image 24
pedrommuller Avatar answered Sep 12 '25 03:09

pedrommuller