acidb / mobiscroll

Cross platform UI controls for progressive web and hybrid apps (plain JS, jQuery, Angular and React)
https://mobiscroll.com
Other
1.54k stars 439 forks source link

SSR Broken #477

Closed anthony0030 closed 4 years ago

anthony0030 commented 4 years ago

Version 4.10.4 no longer works with SSR, If you need more info please feel free to contact me.

Using browser-only version of superagent in non-browser environment

/Users/anthonyveaudry/Sites/gothassos-react/node_modules/@mobiscroll/react/dist/js/mobiscroll.react.min.js:2 ... ^ ReferenceError: document is not defined at /Users/anthonyveaudry/Sites/gothassos-react/node_modules/@mobiscroll/react/dist/js/mobiscroll.react.min.js:2:58483 at /Users/anthonyveaudry/Sites/gothassos-react/node_modules/@mobiscroll/react/dist/js/mobiscroll.react.min.js:2:84 at Object. (/Users/anthonyveaudry/Sites/gothassos-react/node_modules/@mobiscroll/react/dist/js/mobiscroll.react.min.js:2:287) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18)

anthony0030 commented 4 years ago

I upgraded to 5.0.0-beta2 and it doesn't have this problem

dioslaska commented 4 years ago

Thanks for reporting, we will fix this in v4 as well in the next bugfix release.

anthony0030 commented 4 years ago

@mobiscroll/react version 4.10.5 is working now :)

Thank you Mobiscroll team!

dioslaska commented 4 years ago

Thanks for confirming!