Hey everyone, Im upgrading to Prisma 2 and I keep ...
# prisma1-community
j
Hey everyone, Im upgrading to Prisma 2 and I keep getting this error when using prisma-upgrade: SyntaxError: Expected "(", ")", ",", or [_A-Za-z0-9] but ":" found.
j
Are you sure you are giving the tool a Prisma 2+ schema where it expects it, and not a P1 one? P1 had
:
in some location where P2+ does not have it any more - so that could fit (although unfortunately not handled by a good error message)
What command are you executing?
j
I am running npx prisma-upgrade --url http://localhost:4466
Its giving the error on the first relation in the schema, its complaining about the : in @relation(fields: [...
j
Can you easily share your full P2+ schema file?
j
I can try
j
That fundamentally looks good.
Maybe provide the CLI the paths of your prisma.yml and schema.prisma file explicitly
see
npx prisma-upgrade -h
j
How do I do that?
cool
Ill try
@janpio I just did a clean
npx prisma db pull
then ran
npx prisma-upgrade ./prisma/prisma.yml ./prisma/schema.prisma --url <http://localhost:4466>
and Im still getting the same error
j
Hmpf that is not cool.
I guess you created your Prisma schema with
db pull
?
If you did that with a recent version of Prisma, maybe go back to 2.x instead and see if that Introspection result works with the tool. Then we have a pointer that new syntax in the Prisma schema could trigger this.
j
Its a prisma db from 1.34 .. So I should use an early version of prisma 2?
j
How did you get to the Prisma 2 schema you are already using here?
(continued via DM)