question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERROR in Entry module not found: Error: Can't resolve 'babel'

See original GitHub issue

I got this error when i type the following, and before that I have installed the dependencies without error: npm run build Two days ago, I typed this command and build, it works well. ‘webpack-simple’ is the template in this project. I know this may result from the npm package. Maybe some packages owner delete their dependency, or just the template should be updated?

The detail shows here:

E:\webstorm\vue-project>npm run build

> vue-project@ build E:\webstorm\vue-project
> cross-env NODE_ENV=production webpack --progress --hide-modules

Hash: c09da3a503626da73c26
Version: webpack 2.1.0-beta.26
Time: 54ms

ERROR in Entry module not found: Error: Can't resolve 'babel' in 'E:\webstorm\vue-project'

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\ycwalker\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.8.1
npm ERR! npm  v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! vue-project@ build: `cross-env NODE_ENV=production webpack --progress --hide-modules`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the vue-project@ build script 'cross-env NODE_ENV=production webpack --progress --hide-modules'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the vue-project package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env NODE_ENV=production webpack --progress --hide-modules
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs vue-project
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls vue-project
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     E:\webstorm\vue-project\npm-debug.log

Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10

github_iconTop GitHub Comments

30reactions
ozeebeecommented, Nov 14, 2016

if you want to work with latest versions of webpack@2.1.0-beta.26 and webpack-dev-server@2.1.0-beta.11, you can simply add this to your webpack configuration:

  resolveLoader: {
    moduleExtensions: ['-loader']
  },

This is because webpack@2.1.0-beta.26 introduced a breaking change: they no longer add the -loader suffix when resolving loaders.

Source: https://github.com/vuejs-templates/webpack-simple/issues/39#issuecomment-260274071

9reactions
cnahliucommented, Nov 14, 2016

是webpack版本太高了,我暂时的解决办法是指定webpack的版本。

--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
     "css-loader": "^0.25.0",
     "file-loader": "^0.9.0",
     "vue-loader": "^9.7.0",
-    "webpack": "^2.1.0-beta.25",
+    "webpack": "2.1.0-beta.25",
     "webpack-dev-server": "^2.1.0-beta.0"
   }
 }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Module not found: Can't resolve 'babel-loader' | bobbyhadz
To solve the error "Module not found: Error: Can't resolve 'babel-loader'", make sure to install the babel-loader package by opening your terminal in...
Read more >
Error: Cannot resolve module 'babel-loader' - Stack Overflow
I'm trying to run webpack on my postinstall script in my package.json when I push to heroku but I am getting the following...
Read more >
Entry module not found: Error: Can't resolve 'babel-loader' #237
Hey there! Hmm, it sounds like some weird yarn problem, honestly. At times, it seems that the node_modules directory can have the wrong...
Read more >
Circular errors about babel-loader when trying to launch app
When I run yarn dev I get the error that: > ERROR in Entry module not found: Error: Can't resolve 'babel-loader' in.
Read more >
Javascript – ERROR in Entry module not found: Error: Can't resolve ...
Javascript – ERROR in Entry module not found: Error: Can't resolve 'babel-loader'. javascriptjsonnode.jsreactjswebpack. I am a beginner to react.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found