I'm already using the `--force` command but still ...
# orm-help
a
I'm already using the
--force
command but still the docker says that schema is invalid and I should run with the
--force
flag.
Copy code
Step 8/10 : RUN npx prisma introspect --force
 ---> Running in ff2f1297b22c
Prisma schema loaded from prisma/schema.prisma

Introspecting based on datasource defined in prisma/schema.prisma …

Error: P1012 Introspection failed as your current Prisma schema file is invalid

Please fix your current schema manually, use prisma validate to confirm it is valid and then run this command again.
Or run this command with the --force flag to ignore your current schema and overwrite it. All local modifications will be lost.

npm notice 
npm notice New minor version of npm available! 7.15.1 -> 7.18.1
npm notice Changelog: <<https://github.com/npm/cli/releases/tag/v7.18.1>>
npm notice Run `npm install -g npm@7.18.1` to update!
npm notice 
The command '/bin/sh -c npx prisma introspect --force' returned a non-zero code: 1

Error: Process completed with exit code 1.
j
Just a random hunch, try
-- --force
a
On the local machine it's working fine but the issue occurs on the cloud docker machine
@janpio same issue with -- --force
j
the error messsage indicates that it is not getting the argument to the command
a
Seems like it isn't picking up the db URL from prisma file
Copy code
datasource db {
  provider = "postgresql"
  url      = env("DEV_DATABASE_URL")
}
j
That would then lead to a different error message usually
Or do you think it is using a wrong one?
a
It's sorted out. I happened because I tried to run the
introspect
on the cloud and the cloud env didn't read the env variable.
👍 1