Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

No "exports" main defined while using Babelrc for Node js 16 #4313

Closed
HariApplogiq opened this issue Feb 9, 2023 · 3 comments
Closed

No "exports" main defined while using Babelrc for Node js 16 #4313

HariApplogiq opened this issue Feb 9, 2023 · 3 comments
Assignees

Comments

@HariApplogiq
Copy link

HariApplogiq commented Feb 9, 2023

  • 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

@HariApplogiq HariApplogiq added the need/triage Needs initial labeling and prioritization label Feb 9, 2023
@welcome
Copy link

welcome bot commented Feb 9, 2023

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@rolandsaven
Copy link

@HariApplogiq does this help? #4256

@SgtPooki SgtPooki added kind/stale and removed need/triage Needs initial labeling and prioritization labels May 16, 2023
@SgtPooki
Copy link
Member

SgtPooki commented May 16, 2023

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,
@ipfs/helia-dev

@SgtPooki SgtPooki closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2023
@SgtPooki SgtPooki self-assigned this May 17, 2023
@SgtPooki SgtPooki moved this to ✅ Done in js-ipfs deprecation May 17, 2023
@SgtPooki SgtPooki moved this from ✅ Done to 🏃‍♀️ In Progress in js-ipfs deprecation May 17, 2023
@SgtPooki SgtPooki moved this from 🏃‍♀️ In Progress to ✅ Done in js-ipfs deprecation May 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants