nexus-prisma: nexus-prisma types undefined when deploying to heroku
When deploying to heroku the app crashes with the error seen in the screenshot. local build works without any problems.
Screenshot

Description
parts of my package.json file:
"scripts": {
"start": "node .build/api/app.js",
"postinstall": "prisma generate",
"build": "tsc",
},
"dependencies": {
"@prisma/client": "2.27.0",
"apollo-server": "^2.25.2",
"aws-sdk": "^2.939.0",
"bcrypt": "^5.0.1",
"cuid": "^2.1.8",
"graphql": "^15.5.1",
"graphql-middleware": "^6.0.10",
"graphql-shield": "^7.5.0",
"jsonwebtoken": "^8.5.1",
"nexus": "^1.1.0",
"nexus-prisma": "^0.30.0"
},
"devDependencies": {
"typescript": "^4.3.5",
},
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 22 (7 by maintainers)
No. It’s installed as dependency.
no idea why it gets pruned
Would just like to follow up on this issue, was having the same production deploy error as above, using Dokku:
TypeError: Cannot read property '$name' of undefinedWas able to fix it by setting
YARN_PRODUCTION=falseas mentioned, although long term would like to not have to use this flag - any updates on this weird interaction?Running into a potentially similar issue as well:
Type error: Module '"nexus-prisma"' has no exported member 'Model'within the github action runner. I know this is still in early stages of development but wanted to report it.