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

We currently do not inject our entry code into single-file anonymous entries error #37

Closed
dehghani-mehdi opened this issue Apr 17, 2019 · 16 comments · Fixed by #43
Closed
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@dehghani-mehdi
Copy link

Hi,

Using "error-overlay-webpack-plugin": "^0.2.0" and "webpack": "^4.30.0", I got this error:

Error: We currently do not inject our entry code into single-file anonymous entries.
Please use a multi-main (array) or object-form entry setting for now.
at adjustEntry (PATH\node_modules\error-overlay-webpack-plugin\lib\index.js:56:11)

After removing error-overlay-webpack-plugin everything works fine.

@vitormv
Copy link

vitormv commented Apr 17, 2019

Having same error here

@undermuz
Copy link

Have same error

@gregberge gregberge added bug Something isn't working help wanted Extra attention is needed labels Apr 18, 2019
@gregberge
Copy link
Owner

Hello, OK it is a bug. Could someone submit a PR to fix it?

@YaoKaiLun
Copy link

It's ok in v0.1.6 but not in v0.1.7.

@YaoKaiLun
Copy link

YaoKaiLun commented Apr 22, 2019

Changing "entry: './static/src/index.js'" to "entry: ['./static/src/index.js']"

@gregberge
Copy link
Owner

Yeah you have to change entry I think, just that.

@dehghani-mehdi
Copy link
Author

dehghani-mehdi commented Apr 24, 2019

@neoziro if you can't fix the issue (because of time limit or whatever), at least don't close the issue with simple answer that don't even fix the issue (I guess you are not sure neither as you mentioned I think in your answer). obviously I can not change my webpack config just because your plugin likes it that way.

Please don't contribute to open source, but if you do be professional at it. I'll remove your plugin, simply because I can not write my webpack config based on your buggy code.

I see you added help wanted tag to almost all issues. if you can not support (clearly you can't), at least add a note in README, so users can make better decision about using your code.

@gregberge gregberge reopened this Apr 29, 2019
@gregberge
Copy link
Owner

Hello @dehghani-mehdi, if you are not happy feel free to fix this plugin with a PR or simply don't use it.

@dehghani-mehdi
Copy link
Author

dehghani-mehdi commented Apr 29, 2019

@neoziro, Hi, don't worry, I don't use it anymore, I mentioned that in my prev comment.

@gregberge
Copy link
Owner

I don’t worry 🤗

@dehghani-mehdi
Copy link
Author

Good for you ;)

@dehghani-mehdi
Copy link
Author

dehghani-mehdi commented Jun 17, 2019

To anyone who like to have error overlay without error-overlay-webpack-plugin, the solution is very simple, just run npm i react-dev-utils -D and change the entry option of your webpack.config.js to: [require.resolve('react-dev-utils/webpackHotDevClient'), './index.jsx'], I'm using this method for months.

Remember, you should use react-dev-utils only in development mode.

@gregberge
Copy link
Owner

@dehghani-mehdi feel free to submit a PR with an upgraded version of react-dev-utils. I see that there is a new version but I don't have enough time to test if everything work on react-dev-utils v9.

@dehghani-mehdi
Copy link
Author

@neoziro I cloned error-overlay-webpack-plugin, without any change the provided example works fine (of course I changed const ErrorOverlayPlugin = require('../lib') to const ErrorOverlayPlugin = require('../src')). also I updated wabpack packages and again everything works fine. I think I have to test the code with one of my projects. If I do (and could fix the problem), I'll post the result here or submit PR for it.

@dehghani-mehdi
Copy link
Author

Looks like it already fixed by #43

@gregberge
Copy link
Owner

Good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants