Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No "exports" main defined in helia package #693

Open
9twy opened this issue Nov 28, 2024 · 4 comments
Open

No "exports" main defined in helia package #693

9twy opened this issue Nov 28, 2024 · 4 comments

Comments

@9twy
Copy link

9twy commented Nov 28, 2024

I am encountering the following error when trying to import the helia package in my TypeScript project:

Error: No "exports" main defined in C:\Users\saeed\type_script_projects\digital-asset-tracker\Backend\node_modules\helia\package.json
    at exportsNotFound (node:internal/modules/esm/resolve:296:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:586:13)
    at resolveExports (node:internal/modules/cjs/loader:640:36)
    at Function._findPath (node:internal/modules/cjs/loader:748:31)
    ...
    at Module.require (node:internal/modules/cjs/loader:134:12) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Steps to Reproduce

  1. Install the helia package using npm:
    npm install helia

Attempt to import and use helia in my project:

import { createHelia } from 'helia';

Run the project, which leads to the above error.

@ihlec
Copy link

ihlec commented Nov 30, 2024

what node version are you running?

@9twy
Copy link
Author

9twy commented Nov 30, 2024

what node version are you running?

Node.js v22.11.0

@ihlec
Copy link

ihlec commented Nov 30, 2024

could you try importing any other package? Just to confirm that it is no general problem with your environment

@SgtPooki
Copy link
Member

SgtPooki commented Dec 5, 2024

@9twy do you have a link to a repo that can reproduce this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants