Add default exports to the package.json - #174
Merged
Merged
Conversation
So that Meteor v3.5.1+ can import the package
Currently it emits the following error:
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in ./node_modules/hyparquet/package.json
at exportsNotFound (node:internal/modules/esm/resolve:310:10)
at packageExportsResolve (node:internal/modules/esm/resolve:601:13)
at resolveExports (node:internal/modules/cjs/loader:685:36)
at Module._findPath (node:internal/modules/cjs/loader:752:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1461:27)
at wrapResolveFilename (node:internal/modules/cjs/loader:1049:27)
at defaultResolveImplForCJSLoading (node:internal/modules/cjs/loader:1073:10)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1094:12)
at Module._load (node:internal/modules/cjs/loader:1262:25)
at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)
at Module.<anonymous> (node:internal/modules/cjs/loader:1576:12)
at Module.mod.require (.meteor/packages/meteor-tool/.3.5.1.1cwfdj2mk9e++os.osx.arm64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.arm64/dev_bundle/server-lib/node_modules/@meteorjs/reify/lib/runtime/index.js:30:33)
at Module.__rspackServerModule.require (_build/main-dev/server-meteor.js:31:10)
at require (node:internal/modules/helpers:153:16)
at Object.hyparquet (./_build/main-dev/server-rspack.cjs:179636:18)
at __webpack_require__ (./_build/main-dev/server-rspack.cjs:191962:30) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
platypii
approved these changes
Aug 26, 2026
platypii
left a comment
Collaborator
There was a problem hiding this comment.
Reproduced locally with Meteor 3.5.1, Node 24.15, and Rspack. Externalizing hyparquet produces the reported ERR_PACKAGE_PATH_NOT_EXPORTED; applying this change fixes both root and deep require() resolution.
I also checked Node 18 ESM imports, Vite 8, and Browserify before/after and found no regression. Since default follows import, existing ESM resolution remains unchanged.
Collaborator
|
Published in hyparquet 1.29.2. Thanks @dengribar! |
Contributor
Author
|
@platypii Could you please also publish a new version of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, when we try to use
hyparquetpackage in the most recent version of Meteor framework (v3.5.1) our app fails to build and emits the following error:I believe it happens because
./src/*.jsexport is missing inmainentry point, but used byhyparquet-writerpackage which we also use; and becausereifybundler supports modernexportsfield inpackage.json, but since it usescjsloader, it searches forrequireordefaultfields inexportswhich are both missing. Since there's no CommonJS build inhyparquetpackage, I thinkdefaultfield should be used inexportsfor such cases, butrequirefield also works (tested locally both cases)