problem importing first npm package

I’m trying to import my first npm package and getting a “cannot find module” error, funnily, with it still working. I put up a description and links up here, but I’m wondering if this forum is a better place to be seeking help? https://www.reddit.com/r/nextjs/comments/14p9c00/importing_my_first_npm_module_fails_with_error/
Solution:
ok, got some help on IRC to figure it out. If I change the main fom cjs to esm it appears to work. Don't really understand it (is it because I'm exporting named objects?) but it works!
Jump to solution
4 Replies
Scotty O
Scotty OOP2y ago
What line? I don't see tx.locations.update?
Balduin
Balduin2y ago
damn wrong post my bad 😄
Scotty O
Scotty OOP2y ago
All good, thx. You got me very excited for a moment!
Solution
Scotty O
Scotty O2y ago
ok, got some help on IRC to figure it out. If I change the main fom cjs to esm it appears to work. Don't really understand it (is it because I'm exporting named objects?) but it works!
Want results from more Discord servers?
Add your server