-
Notifications
You must be signed in to change notification settings - Fork 134
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
import from node_modules failing #1234
Comments
See #360; this is fixed in main (see https://github.com/observablehq/framework/commits/main/src/node.ts), but we haven't released a new version yet. A version badge is missing in the documentation. |
(congratulations for getting issue #1234! 🔢 🎯) |
Right, this was fun to see. Thanks a lot for your quick response @Fil . From my end I cannot confirm that this bug is solved, because I still get the same error. So far I am not building Framework from main but installed it via Which release should I track so that I can Thank you for you help. Observable is awesome. |
Releases are published on npm and documented here. We hope to ship 1.6 next week or the week after. If you want to use the main branch, you can edit your project’s
then run |
I wouldn’t recommend installing from main as @Fil suggests (since that has other gotchas). I would just wait until we release this feature. |
Thanks Mike. To bei fair: @Fil just reported that the fix is implemented in main and I was asking out of curiousity. I appreciate the hint how I could fetch from main if I were desperate enough. Perhaps next time ;-) This time I will wait for R 1.6 Oh, and we arrived at the release-from-main-procedure because my bug ticket is closed and I was wondering how I would obtain the result. From a customer's point of view, in the sense of Incident Management, the situation is not resolved for me. But I guess you are using these Github issues more to track your internal work than to implement Service Management. Fair enough. |
From our perspective, the only issue was in the documentation, which as of #1236 now correctly notes that the feature is not yet released. That is why this issue is closed. We won’t track an issue if a customer is trying to use a feature that’s not yet released. We don’t support features until they are released. |
You are my hero, @mbostock . I don't argue with you. |
According to https://observablehq.com/framework/imports#node-imports I should be able to import a
lib
which I had previously installed vianpm i lib
.Expected behaviour
npm i canvas-confetti
npm run dev
confetti.md
with following contenthttp://127.0.0.1:3000/confetti
Observed behaviour
At step 5, I get 2 red lines of error messages:
I can verify the npm-installed lib both as an entry in package.json
"canvas-confetti": "^1.9.2",
and as a separate folder (with expected content) in
node_modules/canvas-confetti/
I tried deleting the cache and restarting the dev server.
Variant A
It works when I change the import in
confetti.md
toimport confetti from "npm:canvas-confetti"
(adding thenpm:
).Variant B
I am observing the same failure for other libraries as well.
The text was updated successfully, but these errors were encountered: