Skip to content
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

Help config Angular for Glicol #135

Open
BoogieMonsta opened this issue May 30, 2023 · 4 comments
Open

Help config Angular for Glicol #135

BoogieMonsta opened this issue May 30, 2023 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@BoogieMonsta
Copy link

BoogieMonsta commented May 30, 2023

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!

@chaosprint
Copy link
Owner

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.

@chaosprint chaosprint added the help wanted Extra attention is needed label Jun 13, 2023
@wallzero
Copy link

I'm running into this issue as well with Webpack and React

@chaosprint
Copy link
Owner

chaosprint commented Jul 27, 2024

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.

@wallzero
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants