js-temporal / temporal-polyfill

Polyfill for Temporal (under construction)
ISC License
529 stars 28 forks source link

Can't run it in Node #217

Closed manake closed 1 year ago

manake commented 1 year ago

(Post removed. Resolved.)

12wrigja commented 1 year ago

This is because our package's exports doesn't expose the files within the bundle directly (which is what that error message you shared is telling you): https://github.com/js-temporal/temporal-polyfill/blob/a0972927ec3bbd75966e977839bc1b6bcc13ca1d/package.json#L10

Out of curiousity: what lead you to trying to import the package via the subpath? Is there a document we need to update?

12wrigja commented 1 year ago

It's possible that the change in Node/NPM version changed whether it enforces the exports rules. That stacktrace points to it being enforced entirely within Node, so maybe you were actually using two different major versions of Node on those machines?

Sounds like there's no docs to update - thanks for clarifying.