error 'jQuery requires a window with a document' #1062

Closed
opened 2025-08-09 17:18:43 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @larstbone on 2/1/2017

Just downloaded and ran the latest yeoman template (0.8.1) and installed with options to 1) create angular 2.4.5 spa, 2) using project.json and 3) without unit tests. After generation the app works fine running under both dotnet.exe and in visualstudio.

I need a modal, and added the modal from the ng2-bs3-modal library. After modifying the vendor config and regenerating the vendor modules, I get the error indicating that jquery is not happy when it does not have a window and a DOM.

I realize this may not be a problem with the generated code, but has something to do with Angular Universal, or webpack, or AOT, or HotModuleReplacement or one of the other great features provided in the generator.

My hope is that someone might point me in the right direction. Do we have to give up on all these features to get BS3 or Material to play nicely with the generated code? Is it possible that bootstrap and jquery are not to be used with the generated code?

*Originally created by @larstbone on 2/1/2017* Just downloaded and ran the latest yeoman template (0.8.1) and installed with options to 1) create angular 2.4.5 spa, 2) using project.json and 3) without unit tests. After generation the app works fine running under both dotnet.exe and in visualstudio. I need a modal, and added the modal from the [ng2-bs3-modal](https://github.com/dougludlow/ng2-bs3-modal) library. After modifying the vendor config and regenerating the vendor modules, I get the error indicating that jquery is not happy when it does not have a window and a DOM. I realize this may not be a problem with the generated code, but has something to do with Angular Universal, or webpack, or AOT, or HotModuleReplacement or one of the other great features provided in the generator. My hope is that someone might point me in the right direction. Do we have to give up on all these features to get BS3 or Material to play nicely with the generated code? Is it possible that bootstrap and jquery are not to be used with the generated code?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1062
No description provided.