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

Package path . is not exported from package #66

Open
junior-stack opened this issue Dec 15, 2022 · 1 comment
Open

Package path . is not exported from package #66

junior-stack opened this issue Dec 15, 2022 · 1 comment

Comments

@junior-stack
Copy link

junior-stack commented Dec 15, 2022

Hello, I am trying to develop a package based on is-ipfs. The package version is 7.0.3. I called the peerMultiaddr from the is-ipfs in the following way in typescript:

import { peerMultiaddr } from 'is-ipfs';
export const validate = (nodes: any[]) => {
    nodes.forEach((node) => {
    if (!peerMultiaddr(node)) {
      throw new Error(
        `Incorrect`,
      );
    }
  });
} 

Then I compiled it and tested the compiled package in a nextjs application using yarn link. I got the error of:

Module not found: Package path . is not exported from package<Path>\node_modules\is-ipfs (see exports field in <Path>\node_modules\is-ipfs\package.json)
  2 | Object.defineProperty(exports, "__esModule", { value: true });

I don't receive this error if I downgrade the package version to 0.6.0, but it's really a big downgrade

@hmmdeif
Copy link

hmmdeif commented Feb 2, 2024

Correct, this is an issue for a TS project using the latest release. I had to go down to 6.0.2. Would be cool if the export could be correctly defined.

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

2 participants