Nexus-plugin-prisma: After installing preview-9, unable to run Node.js server

Created on 30 Aug 2019  路  15Comments  路  Source: graphql-nexus/nexus-plugin-prisma

After I installed preview-9, I am getting this error:

/node_modules/@generated/nexus-prisma/index.js:877
        return nexus_1.dynamicOutputProperty({
^
TypeError: nexus_1.dynamicOutputProperty is not a function
    at NexusPrismaBuilder.getCRUDDynamicOutputMethod
notinvalid typbug

Most helpful comment

Question: Is using nexus and nexus-prisma in place of @prisma-nexus expected to be the preferred solution going forward?

@gihrig yes 馃挴 pretend you never saw @prisma/nexus :)

All 15 comments

Is this a new project created with prisma2 init or an existing one you created yourself before?

@janpio it is an existing project, I just updated prisma.

I can reproduce this.
image

Reproduction Steps:

  1. prisma2 init
  2. Starter Kit > GraphQL
  3. yarn install
  4. yarn start

I think this belongs to nexus-prisma repository.

I believe getting everything to its latest form should fix this as a related fix was merged here: https://github.com/prisma/nexus/pull/205#issuecomment-524596726

@divyenduz There doesn鈥檛 seem to be any new release since the merge

Yup, I just wanted to write the context on this issue, probably @jasonkuhrt will look into it shortly.

There doesn鈥檛 seem to be any new release since the merge

Hey @malekjaroslav, there was. Are you already on that version of Nexus and still seeing this error?

@jasonkuhrt Yes I tried this one, but it did not work either. Doesn't the nexus dependency need to be updated within nexus-prisma / @prisma/nexus?

So even though I used the new [email protected] to scaffold the project, I was getting the same error. But when I rolled back to the [email protected] globally and locally, I am finally able to run yarn start without the error. So definitely is an issue between the versions.

Can you post the npm list --depth=0 output for that project please?

For a working example @malekjaroslav you can refer to https://github.com/prisma/nexus-prisma/pull/368. Note it is using "prisma2": "^2.0.0-alpha.155",.

Updating to those versions, omitting @prisma/nexus and using nexus instead, solved the issue. `

    "nexus": "0.12.0-beta.9",
    "nexus-prisma": "0.0.1-beta.7",
    "prisma2": "2.0.0-alpha.160"

@malekjaroslav thanks for bearing with us! 馃檹

@malekjaroslav's version changes and corresponding code changes worked for me with preview-10.

Question: Is using nexus and nexus-prisma in place of @prisma-nexus expected to be the preferred solution going forward?

Question: Is using nexus and nexus-prisma in place of @prisma-nexus expected to be the preferred solution going forward?

@gihrig yes 馃挴 pretend you never saw @prisma/nexus :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ndom91 picture ndom91  路  4Comments

malekjaroslav picture malekjaroslav  路  5Comments

jamesopti picture jamesopti  路  4Comments

mihazs picture mihazs  路  4Comments

mohe2015 picture mohe2015  路  3Comments