question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Zeit Now deployement with prisma2 and nestjs failes

See original GitHub issue

I 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){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> @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
Love TypeGraphQL or use it at work? 
You can now support the project via the Open Collective:
 > https://opencollective.com/typegraphql
> @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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pantharshit00commented, Jan 26, 2020

Hi @marcjulian,

Can you please try this again with prisma2@alpha since the fix is not available in the current stable version.

0reactions
marcjuliancommented, Mar 3, 2020

@pantharshit00 I tested it with preview023 and it works now. Thanks again 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found