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

Broken typescript since release upgrades-core@1.31.2 #976

Closed
jmendiola222 opened this issue Feb 23, 2024 · 4 comments
Closed

Broken typescript since release upgrades-core@1.31.2 #976

jmendiola222 opened this issue Feb 23, 2024 · 4 comments

Comments

@jmendiola222
Copy link

Since release 1.13.2, with this PR we are getting this error while running tsc command:

node_modules/@openzeppelin/upgrades-core/dist/upgrade-interface-version.d.ts:1:23 - error TS2688: Cannot find type definition file for 'debug'.

1 /// <reference types="debug" />
                        ~~~~~

node_modules/@openzeppelin/upgrades-core/dist/upgrade-interface-version.d.ts:3:110 - error TS7016: Could not find a declaration file for module 'debug'. '~/node_modules/debug/src/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/debug` if it exists or add a new declaration (.d.ts) file containing `declare module 'debug';`

3 export declare function getUpgradeInterfaceVersion(provider: EthereumProvider, address: string, log?: import("debug").Debugger): Promise<string | undefined>;
                                                                                                               ~~~~~~~


Found 2 errors in the same file, starting at: node_modules/@openzeppelin/upgrades-core/dist/upgrade-interface-version.d.ts:1

And as this is a not fixed sub-dependency of "@openzeppelin/hardhat-upgrades": "1.27.0", it got updated silently after the release:

image

@ericglau
Copy link
Member

Can you share what version of upgrades-core you currently have installed? e.g. what is the output of npm list @openzeppelin/upgrades-core

How are you using the package and when do you see the above error? If possible, could you share an example github repo that encounters the issue? Thanks.

@jmendiola222
Copy link
Author

Sure, here is what I have now (forcing the last working version 1.31.1):

├─┬ @openzeppelin/hardhat-upgrades@1.27.0
│ └── @openzeppelin/upgrades-core@1.31.1 deduped
└── @openzeppelin/upgrades-core@1.31.1

And this is what it installs if not forced (1.32.5), which fails:

└─┬ @openzeppelin/hardhat-upgrades@1.27.0
  └── @openzeppelin/upgrades-core@1.32.5

How are you using the package and when do you see the above error?

We are using it for tests and manage a bunch of upgradable contracts. The error happens while generating typescript dist with tsc command from "typescript": "5.0.4".
I cant't promise I would have time to set up a repo, but I'll try to.

@ericglau
Copy link
Member

I wasn't able to reproduce the issue using the above versions. At this point, having a repo that encounters this issue would be needed to look into this further.

@ericglau
Copy link
Member

Closing as per the above. Feel free to reopen if this still occurs.

@ericglau ericglau closed this as not planned Won't fix, can't repro, duplicate, stale Aug 26, 2024
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

No branches or pull requests

2 participants