Closed prajwolrg closed 3 months ago
We've not tested the client in react native. Could be that it is not supporting package.json
exports
properly. Please send us a pull request if you figure this one out!
@prajwolrg Please see https://github.com/web3-storage/web3.storage/issues/957#issuecomment-1036338120
@LeslieOA Glad for the help. I tried the solution but it creates more problems than solutions in my case.
I am trying to implement use web3storage with the react-native application to easily upload file in IPFS. I successfully installed web3.storage with npm i nft.storage When I try to import inside my file with
import { NFTStorage, File } from 'nft.storage'
, I get the following error:While trying to resolve module web3.storage from file /home/prajwolrg/School/Vaccination/vaccine_frontend/app/pages/UserSetupImage.js, the package /home/prajwolrg/School/Vaccination/vaccine_frontend/node_modules/nft.storage/package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (/home/prajwolrg/School/Vaccination/vaccine_frontend/node_modules/nft.storage/dist/src/lib.cjs.