0

I'm trying to migrate my project from webpack 1.x to webpack 2.x. I upgraded all the loaders and made sure the configs are passed in correctly. However, I'm getting the below error where it complains that babel-loader is not a loader and was wondering if anyone has any pointers, thanks much!

/Users/satkumar/Dev/gd-webapp-dev/node_modules/loader-runner/lib/loadLoader.js:30
            throw new Error("Module '" + loader.path + "' is not a loader (export function or es6 module))");
            ^

Error: Module '/Users/satkumar/Dev/onboarding/node_modules/babel-loader/index.js' is not a loader (export function or es6 module))
    at loadLoader (/Users/satkumar/Dev/gd-webapp-dev/node_modules/loader-runner/lib/loadLoader.js:30:10)
    at iteratePitchingLoaders (/Users/satkumar/Dev/gd-webapp-dev/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
    at runLoaders (/Users/satkumar/Dev/gd-webapp-dev/node_modules/loader-runner/lib/LoaderRunner.js:362:2)
    at NormalModule.doBuild (/Users/satkumar/Dev/gd-webapp-dev/node_modules/webpack/lib/NormalModule.js:179:3)
    at NormalModule.build (/Users/satkumar/Dev/gd-webapp-dev/node_modules/webpack/lib/NormalModule.js:268:15)
    at Compilation.buildModule (/Users/satkumar/Dev/gd-webapp-dev/node_modules/webpack/lib/Compilation.js:146:10)
    at moduleFactory.create (/Users/satkumar/Dev/gd-webapp-dev/node_modules/webpack/lib/Compilation.js:433:9)
    at factory (/Users/satkumar/Dev/gd-webapp-dev/node_modules/webpack/lib/NormalModuleFactory.js:253:5)
    at applyPluginsAsyncWaterfall (/Users/satkumar/Dev/gd-webapp-dev/node_modules/webpack/lib/NormalModuleFactory.js:99:14)
    at /Users/satkumar/Dev/gd-webapp-dev/node_modules/tapable/lib/Tapable.js:204:11
    at NormalModuleFactory.params.normalModuleFactory.plugin (/Users/satkumar/Dev/gd-webapp-dev/node_modules/webpack/lib/CompatibilityPlugin.js:52:5)
    at NormalModuleFactory.applyPluginsAsyncWaterfall (/Users/satkumar/Dev/gd-webapp-dev/node_modules/tapable/lib/Tapable.js:208:13)
    at resolver (/Users/satkumar/Dev/gd-webapp-dev/node_modules/webpack/lib/NormalModuleFactory.js:74:11)
    at process.nextTick (/Users/satkumar/Dev/gd-webapp-dev/node_modules/webpack/lib/NormalModuleFactory.js:205:8)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickDomainCallback (internal/process/next_tick.js:122:9)
Satheesh Kumar
  • 404
  • 1
  • 4
  • 12
  • What version of `babel-loader` are using? `babel-loader/index.js` has been removed a while ago. Try to update it or at least re-install. – Michael Jungo May 15 '17 at 18:24
  • @MichaelJungo `babel-loader": "^7.0.0` I updated the babel loader to latest, tried a few `6.2.x` versions as well. Going to nuke my `node_modules` and reinstall... – Satheesh Kumar May 15 '17 at 18:36
  • @MichaelJungo That bug went away thanks for the info. However, there seems to be an UglifyJS error - any ideas? `Error: app.2e0c95271d949bd89679.js from UglifyJs Unexpected token: punc (:) [app.2e0c95271d949bd89679.js:2600,13]` – Satheesh Kumar May 15 '17 at 19:35

0 Answers0