Next compiling node_modules
Unanswered
Yacare Caiman posted this in #help-forum
Yacare CaimanOP
I've split my application into a Next app, Node app, and a shared lib (which is a private npm package). The
lib and node projects compile fine, but when trying to compile the next project, it seems like it is trying to compile the private package in the node_modules folder. It fails with ./node_modules/@mycompany/lib/utilities.js Module not found: Can't resolve '@/<some module>'. I made sure that tsconfig.json has "exclude": ["node_modules"].2 Replies
@joulev use <https://github.com/justkey007/tsc-alias> in the compilation process of `lib` and `node`
Yacare CaimanOP
Thanks for the tip. I've found a few limitations of having separate projects, so I may revert to a single project and try having two build options.