"web3.storage": "^4.3.0" has issues with Angular 14.0.3 with files-from-path and graceful-fs dependencies
Opened this issue · 1 comments
In my package.json I have:
"web3.storage": "^4.3.0"
In an Angular project I added:
import { Web3Storage, getFilesFromPath } from 'web3.storage';
When I run command:
ng build
I get:
% ng build
✔ Browser application bundle generation complete.
Error: node_modules/files-from-path/types/index.d.ts:76:8 - error TS1192:
Module '"/Users/javaspeak/workspace3/symbiont/poc/symbiontpoc1/node_modules/@types/graceful-fs/index"'
has no default export.
76 import fs from "graceful-fs";
My versions are as follows:
% ng version
Angular CLI: 14.0.3
Node: 14.17.3
Package Manager: npm 6.14.13
OS: darwin x64
Angular: 14.0.3
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1400.3
@angular-devkit/build-angular 14.0.3
@angular-devkit/core 14.0.3
@angular-devkit/schematics 14.0.3
@schematics/angular 14.0.3
rxjs 7.5.5
typescript 4.7.4
It seems that the angular compiler using typescript 4.7.4 does not find the code in graceful-fs / files-from-path compliant.
Not sure if graceful-fs needs to change its code or files-from-path needs to change its code. However all I can see is that with the above versions I am unable to consume web3.storage from angular 14.0.3
I have also raised this ticket at:
https://github.com/isaacs/node-graceful-fs/issues/233
I raised the other ticket as am not sure if we all need to work in tandem to solve this one.
I thank you in advance for any time you spend answering or advising on a resolution to this issue. Am feeling blocked.
Thank you
Hey @javaspeak
As a temporary solution while isaacs/node-graceful-fs#233 is not solved, my recommendation would be to configure typescript compiler to not check dependencies types.