glicol
glicol copied to clipboard
Help config Angular for Glicol
Hello,
In my Angular app, I have taken the following steps:
-
npm i glicol
-
declare module 'glicol'
in my custom types file./src/types/custom.d.ts
-
import Glicol from 'glicol'
in my main component -
const glicol = new Glicol()
in my main component
Unfortunately, upon executing npm start
I get the following errors:
./node_modules/glicol/index.js:141:23-27 - Error: export 'default' (imported as 'wasm') was not found in './glicol_wasm.wasm?init' (possible exports: __data_end, __heap_base, add_sample, alloc, alloc_uint8array, live_coding_mode, memory, process, reset, send_msg, set_bpm, set_seed, set_sr, set_track_amp, update)
./node_modules/glicol/glicol_wasm.wasm?init - Error: Module not found: Error: Can't resolve 'env' in '/Users/boogie/IdeaProjects/pauseTape/node_modules/glicol'
Any idea what to do about that? Am I supposed to customize my webpack config?
Thanks in advance!
I am sorry that I am not familiar with Webpack. The npm
package is currently only targeting vite
. I plan to separate the js part from this repo so that people can do PR there.
I'm running into this issue as well with Webpack and React
I'm running into this issue as well with Webpack and React
I tried pnpm create vite
for react it works fine. Webpack might handle wasm in a different way.
Yeah I think it does. I haven't used wasm before. Is vite used to create the wasm package? It seems like webpack is missing an 'env' path.