Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack gives error while bundling modules having "main", "module" or "js:next" attributes set to "." in their package.json #6026

Closed
aakashkharche04 opened this issue Nov 28, 2017 · 2 comments

Comments

@aakashkharche04
Copy link

Let us assume I am using a module named do-something in my package.json as a dependency. This module has package.json with entry attributes like

"main": ".",
"module": ".",
"jsnext:main": ".",

While doing bundling for this module through webpack, I get this error
Module not found: Error: Recursion in resolving

I am in an assumption that, the "main": "." attribute path will resolve to "main": "index.js"
I am suspecting webpack is calling do-something module folder again and again.

I investigated more and it is coming from enhanced-resolve package that webpack uses for resolving paths. I use webpack major version 2 "webpack": "^2.4.0"

But I have tried with the latest webpack version as well, it still does not work. Is there a way in webpack to bundle these kinds of dependent modules?

@sokra
Copy link
Member

sokra commented Nov 28, 2017

@webpack-bot move to webpack/enhanced-resolve

Looks like a bug.

@webpack-bot
Copy link
Contributor

I've moved it to webpack/enhanced-resolve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants