#running next build works on windows, but not on linux VPS

17 messages · Page 1 of 1 (latest)

icy palm
#
info  - Linting and checking validity of types  
info  - Creating an optimized production build  
Failed to compile.

./pages/api/user/advertiser/cancel.js
Module not found: Can't resolve './././././models/Advertiser' in '/var/rovertise/pages/api/user/advertiser'

./pages/api/user/advertiser/cancel.js
Module not found: Can't resolve '../../../../models/Ad' in '/var/rovertise/pages/api/user/advertiser'

./pages/api/user/advertiser/create.js
Module not found: Can't resolve '../../../../models/Advertiser' in '/var/rovertise/pages/api/user/advertiser'

./pages/api/user/advertiser/create.js
Module not found: Can't resolve '../../../../models/Ad' in '/var/rovertise/pages/api/user/advertiser'

./pages/api/user/advertiser/index.js
Module not found: Can't resolve '../../../../models/Advertiser' in '/var/rovertise/pages/api/user/advertiser'

On my windows machine it runs just fine.

#

(i tried changing the paths by doing ...... and ./././ etc)

icy palm
#

also has same issue on vercel, my guess is it's something to do with linux

thorn hazel
#

sounds like a casing issue

#

linux is case sensitive

icy palm
thorn hazel
#

which is not allowed

#

mark your component as a client component

icy palm
thorn hazel
#

technically yes you can just add use client to everything

#

but that's bad practice

icy palm
#

so i put use client over whats a client component?

#

is that good practice

thorn hazel