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

Misplaced "type": "module" #219

Closed
michaelfig opened this issue Dec 4, 2019 · 0 comments
Closed

Misplaced "type": "module" #219

michaelfig opened this issue Dec 4, 2019 · 0 comments
Labels
bundle-source package: bundle-source

Comments

@michaelfig
Copy link
Member

When building SwingSet:

> @agoric/swingset-vat@0.3.0 build-kernel /Users/michael/agoric/agoric-sdk/packages/SwingSet
> node -r esm scripts/build-kernel.js

(node:76257) Warning: require() of ES modules is not supported.
require() of /Users/michael/agoric/agoric-sdk/packages/bundle-source/src/index.js from /Users/michael/agoric/agoric-sdk/packages/SwingSet/scripts/build-kernel.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/michael/agoric/agoric-sdk/packages/bundle-source/package.json.
@michaelfig michaelfig added the bundle-source package: bundle-source label Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bundle-source package: bundle-source
Projects
None yet
Development

No branches or pull requests

1 participant