This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Description
Severity:
Critical - Comilation fails as soon as the package is imported.
Description:
node_modules/ipfs-utils/dist/src/files/glob-source.d.ts:10:20
error TS2307: Cannot find module 'ipfs-unixfs/dist/src/types' or its corresponding type declarations.
10 mtime?: import("ipfs-unixfs/dist/src/types").MtimeLike | undefined;
So I checked the package in the node_modules, and there is indeed no dist folder.
Steps to reproduce the error:
npx typescript-starter
npm i ipfs-http-client
- Create a new file
- Import the Options Type
import { Options } from 'ipfs-http-client';
export interface InterfaceName {
options: Options;
}
- Try to compile.
Workaround
Add postinstall to the scripts in your npm package:
"postinstall": "npm run generate-types && cd node_modules/ipfs-unixfs && npm i --production"