Hello!
I am getting this error when rendering the map in a Next.js app
node_modules/react-bingmaps/lib/components/ReactBingmaps/ReactBingmaps.js (49:2) @ new ReactBingmaps
⨯ Internal error: ReferenceError: document is not defined
at new ReactBingmaps (./node_modules/react-bingmaps/lib/components/ReactBingmaps/ReactBingmaps.js:66:9)
The code that is crashing is:
if (document.querySelector('script[src="' + scriptURL + '"]') === null) { _this.loadScript(scriptURL); window.bingmapsCallback = function () { Microsoft = window.Microsoft; this.afterDependencyLoad(pendingProps); }.bind(_this); } return _this;
the thing is that my build process is failing due to this... anyone can give me a hand? thanks in advance!
Hello! I am getting this error when rendering the map in a Next.js app
node_modules/react-bingmaps/lib/components/ReactBingmaps/ReactBingmaps.js (49:2) @ new ReactBingmaps ⨯ Internal error: ReferenceError: document is not defined at new ReactBingmaps (./node_modules/react-bingmaps/lib/components/ReactBingmaps/ReactBingmaps.js:66:9)
The code that is crashing is:
if (document.querySelector('script[src="' + scriptURL + '"]') === null) { _this.loadScript(scriptURL); window.bingmapsCallback = function () { Microsoft = window.Microsoft; this.afterDependencyLoad(pendingProps); }.bind(_this); } return _this;
the thing is that my build process is failing due to this... anyone can give me a hand? thanks in advance!