js-ipfs-utils icon indicating copy to clipboard operation
js-ipfs-utils copied to clipboard

TypeScript declarations broken in 9.0.4

Open grzegorzjudas opened this issue 4 years ago • 5 comments

Hello,

after recent clean install of project dependencies (after removal of package-lock) we stumbled upon a build failure:

node_modules/ipfs-utils/dist/src/files/glob-source.d.ts:10:14 - error TS2503: Cannot find namespace 'fs'.

10     content: fs.ReadStream | undefined;

After examining the contents of that file, it looks like the fs has no reference. It worked in 9.0.2, so I downgraded and found that there's a missing part at the top:

/// <reference types="node" />

that causes the build to fail.

I'm not too sure what changed between the versions, but the downgrade definitely did the trick.

grzegorzjudas avatar Jan 17 '22 10:01 grzegorzjudas

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

welcome[bot] avatar Jan 17 '22 10:01 welcome[bot]

Hello, I also have this same problem Cannot find namespace 'fs'

Waiting for a fix, until then will downgrade I guess.

raress96 avatar Jan 28 '22 19:01 raress96

Hello, I also have this same problem Cannot find namespace 'fs'

Waiting for a fix, until then will downgrade I guess.

To which version we should downgrade.?

jagadeeshmarali avatar Feb 04 '22 13:02 jagadeeshmarali

Hello, I also have this same problem Cannot find namespace 'fs' Waiting for a fix, until then will downgrade I guess.

To which version we should downgrade.?

I downgraded to 9.0.2 and it works fine.

raress96 avatar Feb 04 '22 13:02 raress96

Bump, this is still an issue.

node_modules/ipfs-utils/dist/src/files/glob-source.d.ts:10:14 - error TS2503: Cannot find namespace 'fs'.

10 content: fs.ReadStream | undefined; ~~

Found 1 error in node_modules/ipfs-utils/dist/src/files/glob-source.d.ts:10

A naive temporary solution is to patch the glob-source.d.ts file making it import fs.

H3xept avatar Mar 23 '22 10:03 H3xept