-
Notifications
You must be signed in to change notification settings - Fork 1.2k
No "exports" main defined while using Babelrc for Node js 16 #4313
Comments
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
Finally, remember to use https://discuss.ipfs.io if you just need general support. |
@HariApplogiq does this help? #4256 |
Hello @HariApplogiq, js-ipfs is being deprecated in favor of Helia. You can learn more about this deprecation and the corresponding migration guide here. This current bug or feature request will not be addressed in js-ipfs due to its deprecation. Unfortunately we don’t expect to support it in Helia either. As a result, we are going to close this issue. If you think we have done this in error, please feel to reopen with any comments in the next week as we will circle back on the reopened issues. We hope you will consider Helia for your IPFS in JS needs. We look forward to engaging with you more there. Thanks, |
Version: Node js 16.19
Platform:
MacOS (Big Sur)
Severity:
Critical
Description:
No "exports" main defined in while running with babelrc
Steps to reproduce the error:
Install Npm i ipfs-core ;
Then try import as Mentioned in npm docs
import * as IPFS from "ipfs-core";
async function loadIpfs(file) {
// const { create } = await import("ipfs");
const ipfs = await IPFS.create().catch((e) => {
throw new ApiError(400, e);
});
const { cid } = await ipfs.add(file);
const data = {
cid,
ipfs,
};
return data;
}
Error:
node:internal/modules/cjs/loader:499
throw e;
^
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /Users/hariganesh/Desktop/Hariganesh/HariBackup/Projects/Crypto-pets/Source/crypto-pets-admin-api/node_modules/ipfs-core/package.json
The text was updated successfully, but these errors were encountered: