-
Notifications
You must be signed in to change notification settings - Fork 53
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
TS7016: Could not find a declaration file for module '../cid.js' #255
Comments
This is blocking me from bundling my app with webpack with target node. I managed to remove this library but is widely used by other IPFS libraries such as kubo RPC client |
@Gozala would you mind having a quick look at this? |
@pablomendezroyo would you be able to share a minimal project setup that can replicate this issue? |
Side: maybe this is an example of a class of errors that goes away if we convert to typescript per #249 ? |
@pablomendezroyo given the path Lines 111 to 113 in ff9505c
Without knowing TS version, your tsconfig or the imports in your code leading to this, I'm afraid it is impossible to tell what exactly is misconfigured. As per @rvagg if you could share small reproducible test case we may be able to help you figure out what the issue is.
@BigLep this specific error may go away or it may turn into a different error. Rewriting everything in TS does not imply that everyone will use same TS configuration and version which is where most issues I've seen come from. In fact major reason for generating typedefs (which pure ts projects do as well) is to avoid those issues. As of this specific error, it is likely happening because TS configuration leads compiler to source code of the node dependency instead of typedef that it should. |
This module has been refactored to be TypeScript so these sorts of errors should now be a thing of the past. Please reopen if you're still having trouble here. |
The file
interface.ts
has an importimport { CID } from '../cid.js'
, see https://github.com/multiformats/js-multiformats/blob/9af03687b545a2e558a23aa23dae50b3a9ac6cc5/src/block/interface.ts#LL4C32-L4C32when compiling with ts-loader throws the error
Looks like there is missing a
.ts
file for itThe text was updated successfully, but these errors were encountered: