-
Notifications
You must be signed in to change notification settings - Fork 16
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
Trouble tracking down self is not defined
issue
#20
Comments
@tsnieman Are you using the error handler https://github.com/gajus/isomorphic-webpack#isomorphic-webpack-handling-errors ? |
@gajus Does
|
The change you did seems to be correct. It is supposed to replace |
I was getting the same error and I upgraded the dependencies (especially the css-loader and style-loader, as pointed out in #20 that it's related to css/import) in both isomorphic-webpack and isomorphic-webpack-demo which solved it for me. |
@laggingreflex Thanks for the idea. Though I never had issues with |
Sorry it was actually downgrading the dependencies that helped, not upgrading. The error seems to be coming from here: https://github.com/webpack-contrib/style-loader/blob/master/addStyles.js#L14. return /msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase()); Replacing Edit: I'm only testing this out in |
I have left a comment with the original commit:
– webpack-contrib/style-loader@9dc45a6#commitcomment-21377913 |
@laggingreflex Fantastic find! Rolling back to @gajus Thanks for commenting on the upstream issue. EDIT: I suppose this is still open because the errors aren't working though, right? or? |
Base repo (w/ issue referred to below): https://github.com/tsnieman/webpack2test/tree/road-to-isomorphism_pothole1
Note:
isomorphic-webpack
works in the same repo here... the_pothole1
branch is just for illustrating the issue below. That's the only difference between the two.I've got
isomorphic-webpack
working on a basic level in this test repo, but I'm having issues tracking down an issue which presents itself as the error below.Which seems to happen when I try to use the Home page component in the Router. Digging further, I discovered that it really only throws the
self is not defined
error when I include the lineimport styles from './Home.css';
(implicit or named import, doesn't matter).Not, my CSS loader situation is something like this:
At this point, I'm pretty deep into this and not sure how to continue to debug from the original error message. Might be two issues here:
how do I debug more thoroughly from the given message? I'm using
DEBUG=isomorphic-webpack
but it mostly just mirrors what was spit out in the browser (original error at top).my problem of "why does importing css cause this".
Any insight into either issue would be helpful @gajus / other contributors. Thank you very much.
If it would be helpful, I would be happy to strip my repo down even more (since I might end up doing this anyway), but hoping that I pointed out all the important parts.
The text was updated successfully, but these errors were encountered: