Skip to content

Instantly share code, notes, and snippets.

@mingder78
Last active November 17, 2025 09:18
Show Gist options
  • Select an option

  • Save mingder78/eb41956cb88688e0cb779a3fbd5a357f to your computer and use it in GitHub Desktop.

Select an option

Save mingder78/eb41956cb88688e0cb779a3fbd5a357f to your computer and use it in GitHub Desktop.
Cannot find module '../../../build/Release/node_datachannel.node' from '/private/tmp/x/node/node_modules/@ipshipyard/node-datachannel/dist/esm/lib/node-datachannel.mjs'
problem: when import and envoke a webRTC in a node.js app. that is only for a browser app.
$ bun run --hot index.ts
error: Cannot find module '../../../build/Release/node_datachannel.node' from '/private/tmp/x/node/node_modules/@ipshipyard/node-datachannel/dist/esm/lib/node-datachannel.mjs'
solution: add following code segment to your project.json and build node_modules again
+ "trustedDependencies": [
+ "@ipshipyard/node-datachannel",
+ ],
in your project.json
(only for libp2p app)
@mingder78
Copy link
Author

Mingders-Mac-mini.local😋➜ node git:(main) ✗ 👉bun pm untrusted
bun pm untrusted v1.2.20 (6ad208bc)

./node_modules/protobufjs @6.11.4
» [postinstall]: node scripts/postinstall

These dependencies had their lifecycle scripts blocked during install.

If you trust them and wish to run their scripts, use bun pm trust.
Mingders-Mac-mini.local😋➜ node git:(main) ✗ 👉bun pm trust
bun pm trust v1.2.20 (6ad208bc)
error: expected package names(s) or --all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment