My app consists of a root package.json that can build both subfolders backend/ and frontend/. When I upload my app, the following errors appear. So two questions appear:
How to make Prisma initialized?
How to make it install/see the rest modules?
#14 1.681 src/examples/user-evaluation-example.ts(1,30): error TS2307: Cannot find module@prisma‘@prisma/client’ or its corresponding type declarations.
#14 1.681 src/index.ts(2,19): error TS2307: Cannot find module ‘node-fetch’ or its corresponding type declarations.
#14 1.681 src/index.ts(7,21): error TS2307: Cannot find module ‘express’ or its corresponding type declarations.
#14 1.681 src/index.ts(8,18): error TS2307: Cannot find module ‘cors’ or its corresponding type declarations.
I see the problem with, for example, express module: It is in ./backend/package.json but not in ./package.json. How to make fly.io use the enclosed package.json? If it cannot, what alternative of fly.io can you propose?
Please show your Dockerfile here, so we can see how you’re installing your dependencies. I wonder if you need to COPY your package.json and a lockfile, and then RUN your dependency manager to install your deps into your image.
It may be worth your setting out some context for your question. It sounds like you’re using a monorepo (i.e. several projects in the same repo) but it’s worth noting that readers may not know why you have more than one dependency file. Would you explain what each one is for? Is there one is frontend/ as well?
Right. Fly has a deployment system that uses some heuristics that guess how to build an app. It hasn’t worked in your case. I am not a fan of this approach, personally.
Perhaps Prisma can be made to generate an application with just one dependency JSON file?
I admit I made an assumption here; I had wondered if Prisma is an AI system that generates an app for the user.
Your packages.json; you have several, and you probably need just one.
I am not sure I understand your question. Your several packages.json files is an expression of your app’s dependencies i.e. the libraries it/they need to run.
I don’t think I can advise you further, unfortunately. Perhaps you need to get this app working locally first, using Docker, and then it will probably just work with Fly automatically. I wish you luck with getting things working
Perhaps someone who has more experience with Prisma can offer some advice.