You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
render /chart.js →
Unexpected error: Cannot find module 'lit@3.2.1/index.js'
Require stack:
- /…/hello-framework/src/noop.js
The full error follows
node:internal/modules/cjs/loader:1048
const err = new Error(message);
^
Error: Cannot find module 'lit@3.2.1/index.js'
Require stack:
- /…/hello-framework/src/noop.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
at Function.resolve (node:internal/modules/helpers:136:19)
at resolveNodeImportInternal (file:///…/hello-framework/node_modules/@observablehq/framework/dist/node.js:27:35)
at resolveNodeImport (file:///…/hello-framework/node_modules/@observablehq/framework/dist/node.js:21:10)
at getModuleStaticImports (file:///…/hello-framework/node_modules/@observablehq/framework/dist/resolvers.js:386:23)
at async renderModule (file:///…/hello-framework/node_modules/@observablehq/framework/dist/render.js:177:19)
at async Module.build (file:///…/hello-framework/node_modules/@observablehq/framework/dist/build.js:309:22)
at async file:///…/hello-framework/node_modules/@observablehq/framework/dist/bin/observable.js:87:7 {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/…/hello-framework/src/noop.js' ]
}
Node.js v20.9.0
Description
When I use a node import inside an exported module and run the build script i get the error above.
In this example i installed and used the shoelace library "@shoelace-style/shoelace": "^2.19.1". I'm using version 1.13.2 of Framework.
I was able to reproduce the error with other packages as well. In case of our private chart library e.g. it was d3 that couldn't be found.
The issue only appears when chart.js is defined as an exported module.
If i import the Chart function into a markdown file and use it there, then the build process runs successfully.
I hope this is enough information to reproduce the bug.
The text was updated successfully, but these errors were encountered:
Error message
Description
When I use a node import inside an exported module and run the build script i get the error above.
In this example i installed and used the shoelace library
"@shoelace-style/shoelace": "^2.19.1"
. I'm using version1.13.2
of Framework.I was able to reproduce the error with other packages as well. In case of our private chart library e.g. it was
d3
that couldn't be found.dynamicPaths
is configured as follows:The
src/chart.js
has the following content:The issue only appears when
chart.js
is defined as an exported module.If i import the
Chart
function into a markdown file and use it there, then the build process runs successfully.I hope this is enough information to reproduce the bug.
The text was updated successfully, but these errors were encountered: