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

Compile error while import from "src/orders/types"; #1121

Closed
2 tasks done
mkideal opened this issue Jul 26, 2023 · 4 comments · Fixed by #1122
Closed
2 tasks done

Compile error while import from "src/orders/types"; #1121

mkideal opened this issue Jul 26, 2023 · 4 comments · Fixed by #1122
Labels
bug Something isn't working

Comments

@mkideal
Copy link

mkideal commented Jul 26, 2023

Component

API

Have you ensured that all of these are up to date?

  • opensea-js
  • Node (minimum v16)

What version of opensea-js are you on?

6.1.4

What function is the bug in?

No response

Operating System

macOS (Apple Silicon)

Describe the bug

node_modules/opensea-js/lib/api/types.d.ts:2:30 - error TS2307: Cannot find module 'src/orders/types' or its corresponding type declarations.

import { ProtocolData } from "src/orders/types";

If I change src/orders/types to ../orders/types, the error disappeared.

@mkideal mkideal added the bug Something isn't working label Jul 26, 2023
@ryanio
Copy link
Collaborator

ryanio commented Jul 26, 2023

you should import from the package, like import { ProtocolData } from "opensea-js/orders/types";

@mkideal
Copy link
Author

mkideal commented Jul 26, 2023

It's imported by node_modules/opensea-js/lib/api/types.d.ts:2:30, not my code.

https://github.com/ProjectOpenSea/opensea-js/blob/main/src/api/types.ts#L2

@ryanio
Copy link
Collaborator

ryanio commented Jul 26, 2023

ooh got it, thank you, will open a PR to fix

@ryanio
Copy link
Collaborator

ryanio commented Jul 26, 2023

this should be fixed in v6.1.5 now! thanks again for reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants