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 O17mo ago
What line? I don't see tx.locations.update?
Balduin
Balduin17mo ago
damn wrong post my bad 😄
Scotty O
Scotty O17mo ago
All good, thx. You got me very excited for a moment!
Solution
Scotty O
Scotty O17mo 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