node.js - import with require that works fine on windows but not on ubuntu -


here file tree :

> appointment/     >     db/ >         db.js >     appointment.js 

and in appointment.js made :

require( './../appointment/db/db' ); //init database 

it works on windows on ubuntu 16.04 have error cannot find module './../appointment/db/db'

if have idea.

regards , thanks

as said alexander ./db/db solution work fine on ubuntu & windows/


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -