-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deployment to Now 2.0 fails with: " Property 'model' does not exist on type 'ObjectDefinitionBlock<"MODEL">" #523
Comments
I had this problem before, but it worked after adding Full build script becomes: "build": "npm -s run clean && NEXUS_SHOULD_GENERATE_ARTIFACTS=true npm -s run generate && tsc" |
Thanks a lot @iRoachie. I adjusted the |
Okay I may have missed this line:
I encountered this yesterday after bumping my typescript version. I've since had to resort to pinning |
Hey @nikolasburk Can you try with TS |
hmm, I'm still seeing the same issue, even after downgrading... just for reference, this is my {
"name": "graphql-auth",
"license": "MIT",
"scripts": {
"start": "node dist/server",
"clean": "rm -rf dist",
"build": "npm -s run clean && NEXUS_SHOULD_GENERATE_ARTIFACTS=true npm -s run generate && tsc",
"generate": "npm -s run generate:prisma && npm -s run generate:nexus",
"generate:prisma": "prisma2 generate",
"generate:nexus": "ts-node --transpile-only src/schema",
"postinstall": "npm -s run generate",
"dev": "ts-node-dev --no-notify --respawn --transpileOnly src/server",
"seed": "ts-node prisma/seed"
},
"dependencies": {
"bcryptjs": "2.4.3",
"graphql": "14.5.8",
"graphql-shield": "5.7.3",
"graphql-yoga": "1.18.3",
"jsonwebtoken": "8.5.1",
"nexus": "0.12.0-rc.4",
"nexus-prisma": "0.5.0"
},
"devDependencies": {
"@prisma/sdk": "0.0.21",
"@types/bcryptjs": "2.4.2",
"@types/jsonwebtoken": "8.3.5",
"@types/node": "12.12.6",
"@types/ws": "6.0.3",
"prisma2": "2.0.0-preview015",
"ts-node": "8.4.1",
"ts-node-dev": "1.0.0-pre.44",
"typescript": "3.6.4"
},
"prettier": {
"singleQuote": true,
"semi": false,
"trailingComma": "all"
}
} I also ran:
Also note that it the app is working when I'm running
|
Here's a zipped version of the project in case it's interests anyone 😄 I've remove the password from the DB connection string but feel free to ping me in a DM to get it. |
Hey @nikolasburk, can you please use |
Looks like that works. The only weird thing I found is that yarn would still install a nested version of So ended up having to use the resolutions field to force the correct version: "resolutions": {
"nexus": "0.12.0-beta.14"
} |
I just published |
this is still ongoing!, i am getting this even after downgrading the error is -
|
Hey @michaelspeed that error seems to indicate you are not using the latest version of Nexus. |
Switching from |
Copying over the |
This worked for me! |
Still happening on |
Hello, I'm experiencing the same problem. None of the fixes mentioned in this thread worked. I couldn't try the fix posted by @lvnr as the link seems to be dead. Any chance we could open this again? The repository in question is this one. Build works locally, but refuses to complete when deploying on Vercel, here's my log.
|
Any update on this @creativiii ? I'm running into this issue on heroku as well. I'm getting Property 'crud' does not exist on type 'ObjectDefinitionBlock<"Mutation">. |
In my situation I think I thought I was exporting lambda functions, but I don't think I was. I think that was the problem I was having. I tried switching to GraphQL lambda as a server, unfortunately I then encountered a completely different bug. So no, no progress. I don't even know if the above error is caused by not exporting as lambda or not, sorry. |
same here.. version 0.17.0 |
Encountering this issue when deploying on Heroku. Locally, the same commands work perfectly.
package.json
|
I'm trying to deploy the
graphql-auth
example that's connected to a Postgres DB on Heroku to Now 2.0.Here are the steps I took:
prisma2 init
graphql-auth
starter kit & connect to Postgres DB on Herokuyarn build
now
Any idea what I need to do in order to get this to work?
The text was updated successfully, but these errors were encountered: