Error: Cannot find module '../../startup/client'


#1

We have a really strange problem. The error we keep getting is:
Error: Cannot find module '../../startup/client'

But this file does exist. When we import it in other places it works fine too. When importing the file that imports /startup/client in other places all works too, but in one place where we import it it does not work. Any ideas why or how to debug this?


#2

No extension? client.js?


#3

The actual file is: '../../startup/client/index.js'


#4

Get the same issue if I do:
Error: Cannot find module '../../startup/client/index.js'


#5

Try with full path, /imports/… etc
the …/…/…/ easily gets out of hand :slight_smile:


#6

Yeah… absolute path didn’t help either. I think the issue may be some circular imports. Need to sort out the file structure a little.