generated from napi-rs/package-template
-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Description
Coming from Tonejs/Tone.js#309, trying to get tone to work under node.
Added the following into my main.js in hopes :
import { OfflineAudioContext } from 'node-web-audio-api'
globalThis.window = { OfflineAudioContext }Got the following error:
[nix-shell:~/sp]$ node src/main.js
node:internal/modules/cjs/loader:1661
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: libasound.so.2: cannot open shared object file: No such file or directory
at Module._extensions..node (node:internal/modules/cjs/loader:1661:18)
at Module.load (node:internal/modules/cjs/loader:1266:32)
at Module._load (node:internal/modules/cjs/loader:1091:12)
at Module.require (node:internal/modules/cjs/loader:1289:19)
at require (node:internal/modules/helpers:182:18)
at Object.<anonymous> (/home/allan/sp/node_modules/.pnpm/node-web-audio-api@1.0.7/node_modules/node-web-audio-api/load-native.cjs:56:27)
at Module._compile (node:internal/modules/cjs/loader:1521:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1623:10)
at Module.load (node:internal/modules/cjs/loader:1266:32)
at Module._load (node:internal/modules/cjs/loader:1091:12) {
code: 'ERR_DLOPEN_FAILED'
}
Node.js v20.19.6Searched the library, found it should be in the alsa-lib package on nixos, but I get the error even with the following packages installed:
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-25.11";
pkgs = import nixpkgs { config = {}; overlays = []; };
in
pkgs.mkShellNoCC {
packages = with pkgs; [
deno
ffmpeg
python311
imagemagick
alsa-lib
];
}Where do I even start to debug this?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels