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 v2.3.0 #131

Closed
pdcastro opened this issue Jun 4, 2019 · 2 comments · Fixed by #132
Closed

ReferenceError: window is not defined in v2.3.0 #131

pdcastro opened this issue Jun 4, 2019 · 2 comments · Fixed by #132

Comments

@pdcastro
Copy link

pdcastro commented Jun 4, 2019

My Node.js CI build started failing with the following error, apparently as a result of an update from v2.2.2 to v2.3.0:

node_modules\moment-duration-format\lib\moment-duration-format.js:1723
        if (window.Intl && window.Intl.NumberFormat) {
        ^
ReferenceError: window is not defined

Perhaps a regression of #81 (ReferenceError: window is not defined (2.0.0))?

Probably connected to PR #122, merged a few hours ago.

Workaround: pinning to version ~2.2.2.

Martii added a commit to Martii/OpenUserJS.org that referenced this issue Jun 4, 2019
* Please read their CHANGELOGs
* Delete op retested
* Attempt to squash another MongoDB/*mongoose* deprecation ... applies to OpenUserJS#1516
* Dependency update failure with *moment-duration-format*... keeping pinned to older version. See jsmreese/moment-duration-format#131
Martii added a commit to OpenUserJS/OpenUserJS.org that referenced this issue Jun 4, 2019
* Please read their CHANGELOGs
* Delete op retested
* Attempt to squash another MongoDB/*mongoose* deprecation ... applies to #1516
* Dependency update failure with *moment-duration-format*... keeping pinned to older version. See jsmreese/moment-duration-format#131

Auto-merge
@jsmreese
Copy link
Owner

jsmreese commented Jun 4, 2019

Thanks, and sorry for neglecting to run the tests on node. Really should have automated that!

@Page-
Copy link

Page- commented Jun 4, 2019

I think this is still an issue because window doesn't exist at all so the safe check is typeof window !== 'undefined' && ...

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