konsumer / beatstep

intercept beatstep and make it work in different ways
20 stars 3 forks source link

After installation, I get an error saying that a module cannot be found #15

Closed undercurrent77 closed 7 months ago

undercurrent77 commented 8 months ago

Hey David,

This looks absolutely incredible for using the beatstep. I followed the instruction to install with "npm i -g beatstep" but when I try to run "beatstep list" or any of the other commands, I get the error below. I went ahead and installed the esm module globally so I'm not sure why it's not finding it. I've searched online and wasn't able to find anything besides 'just install the module'. I'm running kubuntu 22.04. If there's any other info I can provide just let me know! I appreciate any help you can provide.

-Chris

node:internal/modules/cjs/loader:1147 throw err; ^

Error: Cannot find module 'esm'

This is the output when I run npm -g list :~$ npm -g list /home//.nvm/versions/node/v21.2.0/lib ├── beatstep@0.0.8 ├── corepack@0.23.0 ├── esm@3.2.25 └── npm@10.3.0

undercurrent77 commented 7 months ago

okay, so responding to myself here in case anyone else has a similar problem. A big caveat here is I'm no pro at this stuff so it might not be the right way to solve the problem, but it worked for me. I went ahead and installed all of the dependencies listed in the packages.json file manually. I did this both globally and locally "npm i " and npm i -g .

Then, I still got an error with a file path pointing to my ".nvm/.../node_modules/beatstep/src/" folder. I copied all of the .js files from the src directory off of github into this folder overwriting the ones that were there. After those steps the program works!

Thanks again for all of your work on this David and for sharing it with us. I'm loving it and in my opinion it's how this thing should've worked out of the box!

-Chris