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
Ethers (5 and 6) expects window
to be defined
#3856
Labels
fixed/complete
This Bug is fixed or Enhancement is complete and published.
v5
Issues regarding legacy-v5
Comments
KillariDev
added
investigate
Under investigation and may be a bug.
v6
Issues regarding v6
labels
Mar 3, 2023
KillariDev
changed the title
Ether's (5 and 6) expect
Ethers (5 and 6) expects Mar 3, 2023
window
to be definedwindow
to be defined
It looks like you are using an old version of ethers. Please update to the latest v5 or v6 version. |
Ethers v6 has the same bug in this line: Line 20135 in 5c29a8d
|
This should be fixed in v6.1.0. Try it out and let me know! :) |
ricmoo
added
fixed/complete
This Bug is fixed or Enhancement is complete and published.
v5
Issues regarding legacy-v5
and removed
on-deck
This Enhancement or Bug is currently being worked on.
v6
Issues regarding v6
labels
Mar 7, 2023
It works. Sorry for the late reply. Thank you! :) |
Woodpile37
pushed a commit
to Woodpile37/ethers.js
that referenced
this issue
Jan 14, 2024
Woodpile37
pushed a commit
to Woodpile37/ethers.js
that referenced
this issue
Jan 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
fixed/complete
This Bug is fixed or Enhancement is complete and published.
v5
Issues regarding legacy-v5
Ethers Version
5.5.1
Search Terms
window, service worker, globalThis
Describe the Problem
When importing Ether's (
ethers.esm.js
) on environment (eg, service worker) that has not definedwindow
, importing fails. This is because line4864
isI believe these checks should check
typeof window !== 'undefined'
instead of forwindow
. Other alternative would be to to useglobalThis
and notwindow
.Code Snippet
import { ethers } from 'ethers.esm.js'
Contract ABI
No response
Errors
Environment
Browser (Chrome, Safari, etc)
Environment (Other)
No response
The text was updated successfully, but these errors were encountered: