Hi team new to graphql, prisma getting this error
# orm-help
n
Hi team new to graphql, prisma getting this error
@nikolasburk following your graphql fundamentals on https://www.howtographql.com/react-apollo/1-getting-started/ from this step getting errors
Copy code
npx prisma migrate save --experimental
d
Het @Naresh, The guide is slightly outdated and needs to be updated. In the meanwhile, can you share which version of Prisma you are running. You can do so by running:
npx prisma -v
?
n
Hi @Daniel Norman prisma : 2.21.2 @prisma/client : 2.20.0
d
Ok. So the first thing I would recommend is to use the same version for both
prisma
and
@prisma/client
(2.21.2) The error you are getting is because the guide is using an older version of Prisma. You should replace the
npx prisma migrate save --experimental
and
npx prisma migrate up --experimental
calls with the following command:
Copy code
npx prisma migrate dev
This will both create and apply the migration, and generate Prisma Client for you.
n
Copy code
PS C:\Projects\GraphQL_1\my-app\server> npx prisma migrate dev
Prisma schema loaded from prisma\schema.prisma
Datasource "db": SQLite database "dev.db" at "file:./dev.db"

Error: The migrations folder contains migration files from an older version of Prisma Migrate which is not compatible.
done changes and getting error from migration folder
d
Ok. In that case, I would recommend deleting the
prisma/migrations
folder and then running the command.
👍 1
The guide and code example should get updated soon.