Skip to content

TypeScript deploy "Cannot find module .prisma/client" #5266

@croossin

Description

@croossin

Bug description

When trying to deploy Prisma client to Elastic Beanstalk, I am seeing the following errors:

Error: Cannot find module '.prisma/client'
Require stack:
- /var/app/current/node_modules/@prisma/client/index.js
- /var/app/current/dist/utils/Prisma.js
- /var/app/current/dist/config/passport.js
- /var/app/current/dist/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
at Function.Module._load (internal/modules/cjs/loader.js:690:27)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/var/app/current/node_modules/@prisma/client/index.js:1:16)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Module.require (internal/modules/cjs/loader.js:852:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/var/app/current/node_modules/@prisma/client/index.js',
'/var/app/current/dist/utils/Prisma.js',
'/var/app/current/dist/config/passport.js',
'/var/app/current/dist/index.js'
]
}

How to reproduce

Follow along this prisma tutorial and attempt to deploy to AWS Elastic Beanstalk

Expected behavior

It to deploy properly.

Prisma information

Package.json :

...
"@prisma/cli": "2.15.0",
"@prisma/client": "2.15.0",
...

tsconfig.json

{
    "compilerOptions": {
      "lib": ["esnext"],
      "outDir": "dist",
      "moduleResolution": "node",
      "esModuleInterop": true,
      "experimentalDecorators": true,
      "emitDecoratorMetadata": true,
      "skipLibCheck": true,
      "forceConsistentCasingInFileNames": true,
    }
  }
  

I will say I have tried all different variations of tsconfig as well...

Metadata

Metadata

Assignees

Labels

bug/1-unconfirmedBug should have enough information for reproduction, but confirmation has not happened yet.kind/bugA reported bug.topic: AWS Beanstalk

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions