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

npm run dev fails with ESM error #2760

Closed
lpsinger opened this issue Dec 8, 2024 · 0 comments · Fixed by #2761
Closed

npm run dev fails with ESM error #2760

lpsinger opened this issue Dec 8, 2024 · 0 comments · Fixed by #2761
Labels
bug Something isn't working

Comments

@lpsinger
Copy link
Member

lpsinger commented Dec 8, 2024

Current behavior

npm run dev fails with the following error message:

sandbox failed! Plugin error:
- Unable to load plugin 'nasa-gcn/architect-plugin-search': require() cannot be used on an ESM graph with top-level await. Use import() instead. To see where the top-level await comes from, use --experimental-print-required-tla.
    at ModuleJobSync.runSync (node:internal/modules/esm/module_job:392:13)
    at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:329:47)
    at loadESMFromCJS (node:internal/modules/cjs/loader:1414:24)
    at Module._compile (node:internal/modules/cjs/loader:1547:5)
    at Object..js (node:internal/modules/cjs/loader:1677:16)
    at Module.load (node:internal/modules/cjs/loader:1318:32)
    at Function._load (node:internal/modules/cjs/loader:1128:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:219:24)
    at Module.require (node:internal/modules/cjs/loader:1340:12)
Error: Plugin error:
- Unable to load plugin 'nasa-gcn/architect-plugin-search': require() cannot be used on an ESM graph with top-level await. Use import() instead. To see where the top-level await comes from, use --experimental-print-required-tla.
    at ModuleJobSync.runSync (node:internal/modules/esm/module_job:392:13)
    at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:329:47)
    at loadESMFromCJS (node:internal/modules/cjs/loader:1414:24)
    at Module._compile (node:internal/modules/cjs/loader:1547:5)
    at Object..js (node:internal/modules/cjs/loader:1677:16)
    at Module.load (node:internal/modules/cjs/loader:1318:32)
    at Function._load (node:internal/modules/cjs/loader:1128:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:219:24)
    at Module.require (node:internal/modules/cjs/loader:1340:12)
    at format (/Users/lpsinger/src/gcn.nasa.gov/node_modules/@architect/inventory/src/lib/error-fmt.js:15:13)
    at /Users/lpsinger/src/gcn.nasa.gov/node_modules/@architect/inventory/src/index.js:80:18
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)

Expected behavior

No error

Steps to reproduce

Run npm run dev.

Environment

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant