jossmac / react-scrolllock

🔒 Prevent scroll on the <body />
https://jossmac.github.io/react-scrolllock
MIT License
451 stars 43 forks source link

React SSR app doesn't start (and worked fine until 4-5 hours ago, before you released 2.0.5) #22

Closed turshija closed 6 years ago

turshija commented 6 years ago

You made a big change but only bumped minor version, so our project that relies on this library stopped working by itself because it updated library. As a workaround, we forced older version using package.json

/app/node_modules/react-scrolllock/dist/PropertyToggle.js:25
var defaultTarget = document.body;
                    ^

ReferenceError: document is not defined
    at Object.<anonymous> (/app/node_modules/react-scrolllock/dist/PropertyToggle.js:25:21)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/app/node_modules/react-scrolllock/dist/ScrollLock.js:17:23)
    at Module._compile (module.js:660:30)
error: Forever detected script exited with code: 1
jossmac commented 6 years ago

Sorry mate, please checkout 2.0.6. Thanks for letting me know