-
Notifications
You must be signed in to change notification settings - Fork 272
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
Cannot find module 'webpack/package.json' problems returned #417
Comments
@yura999999999 It's a bug caused by merged PR with webpack 5 support |
Is there a known way forward to fix this, or is further investigation required? This requires pinning to 5.0 otherwise it breaks linters. Thank you for any communication. |
Having the same issue here. It's even blocking the full eslint checkup by the VS Code eslint extension on the project so it's even causing Eslint to not resolve paths.
A quick workaround in your project is to go to the file const webpackVersion = "4.44.2"; Could this please get some love and be fixed? As this issue is even stopping the full eslint vs code extension / process here. Thanks in advance! |
We have this same issue, but it seems to happen when we go from v5.0.0 -> v5.1.1 or v5.2.1. We are still on webpack v4.44.2 We've had to downgrade this dep back to v5.0.0 |
Hey folks, could you please provide a repo with a working example of this issue? |
I don't believe that's really necesary as it was fixed before by not sniffing the webpack version, but using feature detection. The current version obviously does sniff the webpak version instead again. So guess the solution is in the mentioned commit or the one before that. Please take a look at the references in the 'opening post'. |
@Friksel current version use webpack ver detection for correct work with webpack 5. I need an example of the issue to be sure that after the fix it will work correctly. |
The problem is the inclusion of the getWebpackVersion from utils. That function is bad as it overwrites require.main property. This causes problems in different engines (like vs code). Feature detection should be used instead of this method. At a minimum, require.main shouldn't be getting toyed with. I wrote about it earlier in this issue: #381 |
I start having this problem updating to the latest version |
I've also downgraded all projects to 5.0.0 now, which is the last version that doesn't have this issue (The issue started when making the plugin 'ready for Webpack 5' in 5.1.1) Having to change that function everytime we update node_modules is a pain. |
I'm working on a fix, please try [email protected] Also, it would be great if someone checks PR: #440 |
Just did a quick check with Thanks! |
fix released in [email protected] |
Hi there,
After upgrade version to 5.0.0 (commit b34b2b2)
Problems with getWebpackVersion returned
#338
#309
Previously was fixed by 7131578
@d3x42 Any solutions? is it a bug?
The text was updated successfully, but these errors were encountered: