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.

serverless-plugin-optimize can't parsing @prisma/client.

See original GitHub issue

Bug description

serverless-plugin-optimize can’t parsing @prisma/client. I disabled serverless-plugin-optimize, It’s work well. But I add serverless-plugin-optimize then it’s crash.

https://github.com/ltnscp9028/prisma-optimize-error

How to reproduce

Expected behavior

It work’s packaged.

Prisma information

generator client {
  provider      = "prisma-client-js"
  binaryTargets = ["native", "rhel-openssl-1.0.x"]
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model Post {
  id        Int      @default(autoincrement()) @id
  createdAt DateTime @default(now())
  title     String
  content   String?
  published Boolean  @default(false)
  author    User     @relation(fields: [authorId], references: [id]) // renamed from `User` -> `author`
  authorId  Int     // relation scalar field
}

model Profile {
  id     Int     @default(autoincrement()) @id
  bio    String?
  userId Int     @unique  // relation scalar field
  user   User    @relation(fields: [userId], references: [id]) // renamed from `User` -> `user`
}

model User {
  id      Int      @default(autoincrement()) @id
  email   String   @unique
  name    String?
  posts   Post[]   // renamed from `Post` -> `posts`
  profile Profile? // renamed from `Profile` -> `profile`
}

Environment & setup

  • OS:
  • Database:
  • Node.js version:

Prisma Version

prisma               : 2.23.0
@prisma/client       : 2.23.0
Current platform     : darwin
Query Engine         : query-engine adf5e8cba3daf12d456d911d72b6e9418681b28b (at ../node_modules/@prisma/engines/query-engine-darwin)
Migration Engine     : migration-engine-cli adf5e8cba3daf12d456d911d72b6e9418681b28b (at ../node_modules/@prisma/engines/migration-engine-darwin)
Introspection Engine : introspection-core adf5e8cba3daf12d456d911d72b6e9418681b28b (at ../node_modules/@prisma/engines/introspection-engine-darwin)
Format Binary        : prisma-fmt adf5e8cba3daf12d456d911d72b6e9418681b28b (at ../node_modules/@prisma/engines/prisma-fmt-darwin)
Default Engines Hash : adf5e8cba3daf12d456d911d72b6e9418681b28b
Studio               : 0.393.0

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ltnscp9028commented, May 21, 2021

@janpio Thanks 👍 I try server-webpack and share the result.

0reactions
janpiocommented, May 20, 2021

Via https://github.com/prisma/prisma/issues/5392 I found this: https://github.com/FidelLimited/serverless-plugin-optimize/issues/113 It also includes instructions for a workaround: https://github.com/FidelLimited/serverless-plugin-optimize/issues/113#issuecomment-824401619

In general it does not seem that https://github.com/FidelLimited/serverless-plugin-optimize is very well maintained and active any more. Is there maybe an alternative that you can use?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix There Was A Problem Parsing the Package - iMobie
The parsing issue usually means the application cannot be installed due to apk parser, which may be quite annoying to see this error....
Read more >
is there a better way to make a POST request with Prisma ...
Trying to make a POST request but got an error That I cannot explain/ resolve on my own. Below are ...
Read more >
Cannot work with prisma #113 - bytemeta
Cannot work with prisma. ... Unexpected token (19074:12) while parsing /Users//services/node_modules/@prisma/client/runtime/index.js while parsing file: ...
Read more >
Top 6 Ways to Fix There Was a Problem Parsing the Package ...
Trying to install an APK and getting the infamous there was a problem parsing the package error? Don't worry, here are some ways...
Read more >
Parse Error: What It Is and How to Fix It - Lifewire
When you get a parse error on your Android phone, it means the phone wasn't able to install your app. Check out our...
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