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

Support importing totalist/sync from es modules #6

Merged
merged 2 commits into from
Jan 17, 2022

Conversation

TrySound
Copy link
Contributor

Currently when I'm trying to import totalist/sync from
es module in node I get this error

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '.../node_modules/totalist/sync' is not supported resolving ES modules imported from my-script.js
Did you mean to import totalist/sync/index.js?

Exports field will help to fix this.

Currently when I'm trying to import `totalist/sync` from
es module in node I get this error

```
Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '.../node_modules/totalist/sync' is not supported resolving ES modules imported from my-script.js
Did you mean to import totalist/sync/index.js?
```

Exports field will help to fix this.
package.json Outdated Show resolved Hide resolved
@lukeed lukeed merged commit 0dfdc59 into lukeed:master Jan 17, 2022
@TrySound TrySound deleted the exports branch January 17, 2022 11:30
@TrySound
Copy link
Contributor Author

Do you want to do something else before release?

@lukeed
Copy link
Owner

lukeed commented Jan 17, 2022

Released as 3.0.0 now – i wasnt by a computer yesterday when I merged :)

@TrySound
Copy link
Contributor Author

Thanks!

@lukeed
Copy link
Owner

lukeed commented Jan 17, 2022

sirv@2.0.2 is now released too btw, which is probably why/where you saw this error

@TrySound
Copy link
Contributor Author

Ah, no. I used totalist in our build scripts 😄

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

Successfully merging this pull request may close these issues.

2 participants