Answer the question
In order to leave comments, you need to log in
How to include native modules in Node.js under Ubuntu?
I'm trying to connect my own module, it doesn't find it if it's in a folder. There are 2 cases:
require('./customModule')(app);
require('./modules/customModule')(app);
In the first - everything works and finds, in the second it finds under Windows, under Ubuntu - no, what could be the problem?
Here is the error
Error: Cannot find module './modules/customModule'
Answer the question
In order to leave comments, you need to log in
try using NODE_PATH=.
working with relative links in the requester is extremely inconvenient =)
In general, check the case, Windows ignores the case of letters, Linux does not.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question