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

Angular 2 Universal "window is not defined" error. #167

Closed
epanchintsev opened this issue Jan 27, 2017 · 4 comments
Closed

Angular 2 Universal "window is not defined" error. #167

epanchintsev opened this issue Jan 27, 2017 · 4 comments
Assignees

Comments

@epanchintsev
Copy link

When using with Angular 2Universal retrieve error "Call to Node module failed with error: Prerendering failed because of error: ReferenceError: window is not defined".
Obviouse error caused by using window object in that fragment of style-loader

isOldIE = memoize(function() {
			return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
		})

@UnGast
Copy link

UnGast commented Feb 9, 2017

I also experienced this with vue-server-renderer. It's in addStyles.js, line 14.

@leobudima
Copy link

Same problem with React...

@UnGast
Copy link

UnGast commented Feb 13, 2017

#159 seems to fix it.

@michael-ciniawsky
Copy link
Member

@epanchintsev @UnGast @leobudima I'm sry you guys but style-loader won't support any SSR functionality and therefore this issue is sadly won't fix. See #159 for reasons and solutions/alternatives

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

5 participants