Hello! I’m having a problem while deploying from a monorepo, which is using npm workspaces. Render just doesn’t see it. (for example: npm run build -w shared
is ignored). Local import works good, but deployed version fails. I don’t even know what additional info is neccessary… it just doesnt work.
Structure of my project:
root
|---- client
|---- shared
|-----server
Client (react app) is hosted in firebase through the gh actions.
Shared folder contains types and enums.
Server is on node.js.
When i’m not using commands like npm run build -w shared
and using cd shared && npm i && npm run build && cd server && npm i && npm run build
it gives me error:
Mar 17 05:12:31 PM server.ts(5,91): error TS2307: Cannot find module 'shared' or its corresponding type declarations.
.
Buuut all node_modules are in the root directory and maybe this is the problem? Because render just doesnt see workspaces