[Bug]: Jest can't resolve ipfs-http-client
See original GitHub issueVersion
29.2.2
git@github.com:ssadler/jest-resolver-ipfs.git
Steps to reproduce
Check out repository: https://github.com/ssadler/jest-resolver-ipfs
yarn
npx jest
Expected behavior
Is able to import the module
Actual behavior
Can’t import the module
Additional context
Digging into it further, I found it resolves the module folder but when it gets to the point of resolving the entrypoint from "exports"
it fails. If you add “import” to options.conditions
, then it does import the module but fails with a parse error when it encounters import ...
in the code.
In my Typescript project, I have set transformIgnorePatterns: [],
, but this doesn’t seem to help.
Also tried enhanced-resolve
(doesn’t make any difference), and jest-light-runner
which gives: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No “exports” main defined
Thanks
Environment
System:
OS: Linux 5.15 Ubuntu 22.04 LTS 22.04 LTS (Jammy Jellyfish)
CPU: (16) x64 AMD Ryzen 7 PRO 4750U with Radeon Graphics
Binaries:
Node: 18.12.0 - ~/.nvm/versions/node/v18.12.0/bin/node
Yarn: 3.2.1 - ~/.nvm/versions/node/v16.16.0/bin/yarn
npm: 8.19.2 - ~/.nvm/versions/node/v18.12.0/bin/npm
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Module not found: Can't resolve 'ipfs-http-client' in 'D:\Pro\src ...
Try using earlier version I have just tried it. Do the following : npm uninstall --save ipfs-http-client npm i --save ipfs-http-client@33.1.
Read more >ipfs-http-client - npm
Start using ipfs-http-client in your project by running `npm i ... A URL that resolves to a running instance of the IPFS HTTP...
Read more >Add file to ipfs (node.js) - Infura Community
I cant find any example code for node.js in documentation. ... const ipfsClient = require('ipfs-http-client'); const projectId = '1x.
Read more >ipfs-api | Yarn - Package Manager
ipfs-api has been renamed to ipfs-http-client, please update your package.json to get the latest version. A client library for the IPFS HTTP API....
Read more >jest typeerror: class extends value - You.com | The AI Search ...
Runtime error in jest - TypeError: Class extends value undefined is not a ... is there any way to fix this or disable...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think you should do the following below: npm uninstall --save ipfs-http-client npm i --save ipfs-http-client@33.1.1
the 33.1.1 version does not seem to have type definitions for typescript, at least I get a lot of errors after downgrading. What is the problem with the newest version of ipfs-http-client and why should there be a need to downgrade?