Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
problem importing first npm package - Theo's Typesafe Cult
TTC
Theo's Typesafe Cult
•
3y ago
•
6 replies
Scotty O
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/
reddit
r/nextjs - importing my first npm module fails with: Error: Cannot ...
0 votes and 0 comments so far on Reddit
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
Theo's Typesafe Cult
Join
26,564
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Importing npm packages in Deno
TTC
Theo's Typesafe Cult / questions
3y ago
Npm package template
TTC
Theo's Typesafe Cult / questions
13mo ago
npm package issue
TTC
Theo's Typesafe Cult / questions
3y ago