Zeit Now deployement with prisma2 and nestjs failes
See original GitHub issueI am using prisma2 in version prisma2@2.0.0-preview020.2, binary version: 0150d2c09b7ddee6b866a924dea38ba157ad4980
.
I uploaded a nestjs project with prisma2 to zeit now with the now.json
:
{
"version": 2,
"name": "nest-prisma-starter",
"builds": [
{
"src": "dist/main.js",
"use": "@now/node"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "dist/main.js"
}
],
"env": {
"POSTGRESQL_URL": "@postgresql_url"
}
}
I followed the example but I am receiving the following build error in Zeit now:
Build error in zeit now
Downloading 102 deployment files...
Installing build runtime...
Build runtime installed: 554.625ms
Looking up build cache...
Installing dependencies...
> bcrypt@3.0.7 install /zeit/152c301f/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
[bcrypt] Success: "/zeit/152c301f/node_modules/bcrypt/lib/binding/bcrypt_lib.node" is installed via remote
> prisma2@2.0.0-preview020.2 install /zeit/152c301f/node_modules/prisma2
> node download-build/index.js
> core-js@3.6.4 postinstall /zeit/152c301f/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
[96mThank you for using core-js ([94m https://github.com/zloirock/core-js [96m) for polyfilling JavaScript standard library![0m
[96mThe project needs your help! Please consider supporting of core-js on Open Collective or Patreon: [0m
[96m>[94m https://opencollective.com/core-js [0m
[96m>[94m https://www.patreon.com/zloirock [0m
[96mAlso, the author of core-js ([94m https://github.com/zloirock [96m) is looking for a good job -)[0m
> @apollo/protobufjs@1.0.3 postinstall /zeit/152c301f/node_modules/@apollo/protobufjs
> node scripts/postinstall
> type-graphql@0.17.6 postinstall /zeit/152c301f/node_modules/type-graphql
> node ./dist/postinstall || exit 0
[32mLove TypeGraphQL or use it at work?
You can now support the project via the Open Collective:[22m[39m
> [96m[1mhttps://opencollective.com/typegraphql[0m
> @nestjs/core@6.10.14 postinstall /zeit/152c301f/node_modules/@nestjs/core
> opencollective || exit 0
Thanks for installing nest
Please consider donating to our open collective
to help us maintain this package.
Number of contributors: 406
Number of backers: 282
Annual budget: $63,975
Current balance: $5,116
Become a partner: https://opencollective.com/nest/donate
> @prisma/client@2.0.0-preview020.2 postinstall /zeit/152c301f/node_modules/@prisma/client
> node scripts/postinstall.js
Error: Can't find schema.prisma
1
Error: In order to use "@prisma/client", please install prisma2. You can install it with "npm add -D prisma2".
at main (/zeit/152c301f/node_modules/@prisma/client/scripts/postinstall.js:27:9)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
> nest-prisma-starter@0.0.1 postinstall /zeit/152c301f
> npm run prisma:generate
> nest-prisma-starter@0.0.1 prisma:generate /zeit/152c301f
> npx prisma2 generate
Generated Prisma Client to ./node_modules/@prisma/client
Done in 6.14s
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fork-ts-checker-webpack-plugin/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 1509 packages from 766 contributors in 32.45s
Build completed. Populating build cache...
Build cache uploaded [75.68 MB]: 1253.472ms
done
Here is a nest project w/ prisma which used to deploy to now.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Deploy a Nest application with Prisma database on Zeit Now ...
So this story is about the backend part: Backend language/framework; Database; Hosting. NestJS. I've choosen NestJS as my backend. It's a strong ...
Read more >I cant deploy to zeit now · Issue #1307 - GitHub
Hello im trying to deploy graphql-auth example to zeit now platform but is given me this error: Changelog: ...
Read more >Building a REST API with NestJS and Prisma: Error Handling
In this tutorial, you will implement error handling in a NestJS application. You will learn two ways to handle errors: directly in your ......
Read more >Zeit : Prisma 2 did not initialize yet error - Stack Overflow
Prisma generates the client in the @prisma/client module found in node_modules and if it isn't generated it throws the error that you see....
Read more >How To Fix Nestjs Deployment Error To The Vercel - ADocLib
Learn how to deploy a Next.js app with a serverless REST API using Prisma Next.js is a ... Closed problem with deploying to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @marcjulian,
Can you please try this again with
prisma2@alpha
since the fix is not available in the current stable version.@pantharshit00 I tested it with preview023 and it works now. Thanks again 😃