Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReferenceError: window is not defined in node_modules/monolite/lib/monolite/index.js:1 #46

Closed
ellis opened this issue Mar 28, 2019 · 7 comments · Fixed by #60
Closed

Comments

@ellis
Copy link

ellis commented Mar 28, 2019

I just installed the latest version of monolite, but when I import it into a script, I get the following error:

ReferenceError: window is not defined

/.../node_modules/monolite/lib/monolite/index.js:1

If I edit index.js and replace the one instance of window with {}, then everything runs as expected. Any idea why the superfluous window reference is in index.js?

Cheers!

@kube kube pinned this issue May 5, 2019
@medfreeman
Copy link

Hi, would you accept a PR containing the suggested change ?

@kube
Copy link
Owner

kube commented Mar 19, 2020

@medfreeman Sorry, just coming back here. (Gonna try to keep my Github notifications clean from now on)
If you are still interested of course, I would be happy to see people contributions.
I really need to update and maintain this library though.

@kube
Copy link
Owner

kube commented Mar 23, 2020

This is because of webpack/webpack#6522
I'm gonna create a fix for it. (I did update all packages this weekend, and did setup automatic NPM publish to be able to update easily this library.

@medfreeman
Copy link

Nice, thanks a lot!

@kube kube mentioned this issue Apr 5, 2020
@kube kube closed this as completed in #60 Apr 5, 2020
@kube
Copy link
Owner

kube commented Apr 5, 2020

Should be fixed now.
I know it's been a long time since the issue creation, but do not hesitate to come back creating an issue if you face any issue with the library.

@medfreeman
Copy link

With 0.9.0, i still get the error while calling the function:

ReferenceError: window is not defined
[redacted module]:     at Object.<anonymous> (/[redacted path]/node_modules/monolite/dist/index.js:1)

@kube kube reopened this Aug 30, 2020
@kube
Copy link
Owner

kube commented Sep 15, 2020

Ok there was an issue with deployment.
Should be fine now. I tested it manually from CodeSandbox both on Node and Browser.

Thanks for your report.

@kube kube closed this as completed Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants