-
|
I'm trying to get data loaders to work, but whatever I do I get
Even an empty script block causes the failure <script type="application/vnd.node.javascript">
</script>The error in the browser, and output on the command line don't provide any clues to what the problem is: This is what I have installed (also tried with v22 and v24): Is there any way to get more logging or info on what is causing the error? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
|
Python works if I leave the script block empty (unlike Node), but adding any code at all results in the same error as above % which python
/Users/<...>/.venv/bin/python
% python --version
Python 3.14.1 |
Beta Was this translation helpful? Give feedback.
-
|
Are you using Observable Notebook Kit (from the command line) or Observable Desktop? |
Beta Was this translation helpful? Give feedback.
-
|
An empty Node block exiting with Two things stand out from the trace: I would first try to separate “Notebook Kit data loader bug” from “package manager / runtime launch issue”. Checklist I would run: node -e "process.exit(0)"
node -e "console.log('hello')"
python -c "print('hello')"from the same shell where you start Notebook Kit. Then try one clean install without Yarn PnP zip execution: # .yarnrc.yml
nodeLinker: node-modulesthen reinstall and run Notebook Kit again. The reason I would test that is that the stack is coming from a package inside Yarn's virtual zip/cache path. If Notebook Kit spawns a child process and expects normal filesystem paths for loader/runtime files, PnP zip paths are a plausible failure source. I would also test with an active LTS Node version, for example Node 24 or 22, not only v26: node --versionIf it fails with Node 26 but works with 24/22, that is useful compatibility information. If it fails only under Yarn PnP but works with For better debugging, the most useful extra output would be stderr/stdout from the spawned interpreter process and the exact command/args Notebook Kit is spawning. Right now |
Beta Was this translation helpful? Give feedback.
-
|
Sorry for not including the full context before: I'm running this on macOS on an Intel Mac with a fresh install of Notebook kit ( Thank you for the help debugging this, your suggestions resolved the issue. I'll include more context below so it can be found if someone is experiencing the same issue in the future. It seems like @yudin-s hunch that it was to do with Yarn's packaging. Creating a new setup with -- The terminal reset thing was sneaky. I did not notice that happening at all. There was indeed a more complete error message hiding above the fold. Here is the full error message: |
Beta Was this translation helpful? Give feedback.
Sorry for not including the full context before: I'm running this on macOS on an Intel Mac with a fresh install of Notebook kit (
yarn add @observablehq/notebook-kit-> "^1.7.8" in `package.json).Thank you for the help debugging this, your suggestions resolved the issue. I'll include more context below so it can be found if someone is experiencing the same issue in the future.
It seems like @yudin-s hunch that it was to do with Yarn's packaging. Creating a new setup with
npmworked, and usingnodeLinker: node-moduleswith Yarn also resolved the issue.--
The terminal reset thing was sneaky. I did not notice that happening at all. There was indeed a more complete error message hiding above…