Closed mehbubOG closed 6 years ago
The problem is that window
doesn't exist on the server (neither does document
or any other DOM element). In fact, this plugin doesn't make any sense to run in non-browser environments since there are no elements to measure.
I added some verification logic in the latest version (2.0.1) so it shouldn't completely fail when it's not in the browser. Even so, perhaps there is a way you can exclude this script except when it is running in the browser.
@patik can you update the fixed release on npm? Currently unable to install 2.0.1 using npm. Thank you!
npm ERR! code ETARGET
npm ERR! notarget No matching version found for withinviewport@2.0.1
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
@suparnavg Just published 2.1.0, sorry for the delay.
Hi,
I am integrating my existing angular project into Universal code.I am able to bulid the server and in dist folder i am able to create server and browser folders.While i am running the server, i am getting the below error. This is not in my custom modules. It is in withinviewreport.js under node_modules
Versions of ngx-bootstrap, Angular, and Bootstrap:
Please let me know how can i over come to run my project