aws / mynah-ui

The chat interface of Amazon Q Developer (for IDEs)
https://aws.github.io/mynah-ui/
Apache License 2.0
15 stars 14 forks source link

Cannot use import statement outside a module #135

Closed ButterOnBurntToast closed 2 weeks ago

ButterOnBurntToast commented 3 weeks ago

Problem

Steps to reproduce the issue

> @amzn/mynah-website@1.0.0 dev
> node ./dev.js

(node:15675) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
mynah-ui/example/dev.js:1
import open from 'open';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at internalCompileFunction (node:internal/vm:76:18)
    at wrapSafe (node:internal/modules/cjs/loader:1283:20)
    at Module._compile (node:internal/modules/cjs/loader:1328:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Module._load (node:internal/modules/cjs/loader:1019:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
    at node:internal/main/run_main_module:28:49

Node.js v18.20.2

Expected behavior

System details

Jurredr commented 2 weeks ago

Closed; already an open PR to address this issue. Thanks for reporting!

Jurredr commented 2 weeks ago

(https://github.com/aws/mynah-ui/pull/136)