-
Notifications
You must be signed in to change notification settings - Fork 221
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
TypeError: Safe.create is not a function #419
Comments
Current workaround:
typescript is not happy but it runs 🤷♂️ |
Thanks for posting, no idea what is going on internally to require this hack but it worked for me |
Seems related to this |
Hey @ipatka. I have some questions:
Thanks! |
It can be reproduced in node when using ESM |
We are compiling to commonjs the But when creating a simple node project to test i have an error even before (Safe is not a constructor). For this reason i want to know the exact configuration @ipatka is using with TS |
For now when using |
Sounds good thanks for addressing! Here's my setup if it helps: tsconfig.json
selected package.json
Example script
|
Thanks! |
Seeing the same problem when my TSConfig is using module and/or moduleResolution Thanks @ipatka for the workaround ❤️ |
Description
When importing the Safe class to connect with an existing Safe, it does not import the right module. Instead importing the rest of the module.
Environment
Steps to reproduce
Expected result
Safe connection works
Additional context
Maybe there's a name collision in src/index.ts? export default Safe doesn't seem to work. The exports on lines 57-103 are getting imported.
Possibly related
#411
The text was updated successfully, but these errors were encountered: