jsfxr: Error resolve 'riffwave' in node modules.

Hi, Chris,

I am trying to use your library in a typescript/react project originally and was getting this error:

ERROR in ./node_modules/jsfxr/sfxr.js 
Module not found: Error: Can't resolve 'riffwave' in '/home/colin/projects/sound-test/my-app/node_modules/jsfxr'
Did you mean './riffwave'?
Requests that should resolve in the current directory need to start with './'.

So, I originally thought I might have some compatibility issues with require/import syntax, but after much troubleshooting I couldn’t figure it out. So, I spun up a very simple create-react-app to try to see if I could get jsfxr to work and somehow I am still getting the same error. I checked in the suggested file for the problem, but it looks like the require is happening correctly and the error is incorrect… RIFFWAVE = require("./riffwave.js"); is the only place I could find inside my-app/node_modules/jsfxr/sfxr.js So, I can’t figure out what the issue is. Any ideas?

Do I need to npm i riffwave as well? When I try that it fails to find it.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

All good, thanks for reporting the bug, and thanks very much for taking the time to test and report back.

Yeah just go ahead and paste it. Use three back-ticks: ` to designate a code block.

Hi @colinwilliams91 thanks for reporting this. Can you send me the code you are using to require jsfxr? And also the node command you are using.