Coder Social home page Coder Social logo

Comments (16)

gihrig avatar gihrig commented on August 24, 2024 2

@ManAnRuck A change in preview-2 requires that you remove the output property from

generator nexus_prisma {
  provider = "nexus-prisma"
  output   = "node_modules/@generated/nexus-prisma"
}

See #143 for details.

from prisma-client-js.

rwoody avatar rwoody commented on August 24, 2024 1

Same issue for me but when running the graphql-auth example and npm start

from prisma-client-js.

ManAnRuck avatar ManAnRuck commented on August 24, 2024 1

🙂 @gihrig after removing output it was working (and remove and reinstall node_modules folders)

from prisma-client-js.

Cerberus avatar Cerberus commented on August 24, 2024

Have you tried prisma2 generate ?

1). Create a new migration

prisma2 lift save --name 'init'

2). Migrate your database up

prisma2 up

3). Generate Photon

prisma2 generate

from prisma-client-js.

divyenduz avatar divyenduz commented on August 24, 2024

This issue has been resolved in the latest CLI version 0.0.95, please install it using npm install -g prisma2 and try again.

Related issue: https://github.com/prisma/prisma2-cli/issues/6 (This is the correct repository for creating CLI related issues)

from prisma-client-js.

matthewmueller avatar matthewmueller commented on August 24, 2024

Closing. We can reopen if it's still an issue :-)

from prisma-client-js.

lednhatkhanh avatar lednhatkhanh commented on August 24, 2024

Still happening for me with [email protected]

Update: I've just noticed that this will happen when I add "target": "es6" to tsconfig.json, removed it and the issue goes away, not sure if this is a problem or not.

from prisma-client-js.

divyenduz avatar divyenduz commented on August 24, 2024

@lednhatkhanh : Can you please share your Prisms schema file? (project.prisma)

from prisma-client-js.

lednhatkhanh avatar lednhatkhanh commented on August 24, 2024

@divyenduz I have a simple model file just like this:

datasource db {
  provider = "sqlite"
  url      = "file:dev.db"
  default  = true
}

generator photon {
  provider = "photonjs"
}

generator nexus_prisma {
  provider = "nexus-prisma"
  output   = "node_modules/@generated/nexus-prisma"
}

model User {
  id          String       @default(cuid()) @id @unique
  email       String       @unique
  name        String
  coffeeShops CoffeeShop[]
  password    String
}

model CoffeeShop {
  id        String   @default(cuid()) @id @unique
  name      String
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
  wifi      Boolean
  maxPrice  Float
  minPrice  Float
  openAt    DateTime
  closeAt   DateTime
  address   String
  mapsUrl   String
  createdBy User
  mainImage String
}

typescript: 3.5.2, @prisma/nexus: 0.0.1, prisma2: 0.0.114

from prisma-client-js.

zhnd avatar zhnd commented on August 24, 2024

[email protected] is same error

from prisma-client-js.

EdoardoVarani avatar EdoardoVarani commented on August 24, 2024

[email protected] same error on Linux Mint

from prisma-client-js.

divyenduz avatar divyenduz commented on August 24, 2024

After each yarn/npm install operation, the node_modules are made pristine by the respective package managers, this removes all generated code such as Photon. The solution is to use "prisma2 generate" as a postinstall hook.

This document talks more about this design decision.

Please let me know if this issue is fixed for you after adding the postinstall hook.

from prisma-client-js.

ManAnRuck avatar ManAnRuck commented on August 24, 2024

@divyenduz for me it doesn't resolve the issue :/

[email protected], binary version: 4f33077038a490e4b2c1c260f109309e4a447181

Bildschirmfoto 2019-07-23 um 09 10 33

from prisma-client-js.

timsuchanek avatar timsuchanek commented on August 24, 2024

It sounds like this can be closed, as removing a hardcoded output fixes it.

from prisma-client-js.

dojsys avatar dojsys commented on August 24, 2024

Can we use photon in client side app like Angular or React?

from prisma-client-js.

janpio avatar janpio commented on August 24, 2024

Good question @dojsys, you should create a new issue for this question though. Thanks.

from prisma-client-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.