Comments (16)
@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.
Same issue for me but when running the graphql-auth example and npm start
from prisma-client-js.
🙂 @gihrig after removing output it was working (and remove and reinstall node_modules folders)
from prisma-client-js.
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.
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.
Closing. We can reopen if it's still an issue :-)
from prisma-client-js.
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.
@lednhatkhanh : Can you please share your Prisms schema file? (project.prisma
)
from prisma-client-js.
@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.
[email protected] is same error
from prisma-client-js.
[email protected] same error on Linux Mint
from prisma-client-js.
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.
@divyenduz for me it doesn't resolve the issue :/
[email protected], binary version: 4f33077038a490e4b2c1c260f109309e4a447181
from prisma-client-js.
It sounds like this can be closed, as removing a hardcoded output
fixes it.
from prisma-client-js.
Can we use photon in client side app like Angular or React?
from prisma-client-js.
Good question @dojsys, you should create a new issue for this question though. Thanks.
from prisma-client-js.
Related Issues (20)
- PANIC: index out of bounds: the len is 1 but the index is 1
- TypeError: Cannot read property '_clientVersion' of undefined at $connect 2.9.0 HOT 4
- Query engine binary for current platform "rhel-openssl-1.0.x" could not be found HOT 1
- PANIC: 1 auto issue create
- /node_modules/@prisma/client/runtime/index.js Module not found: Can't resolve 'async_hooks' HOT 2
- PANIC: called `Option::unwrap()` on a `None` value HOT 2
- PANIC: expected 0 parameters but got 1 (when running $executeRaw`...`) HOT 2
- PANIC: Started http server on http+unix:///tmp/prisma-4853a1cebce032c1dde71620.sock HOT 2
- findUnique (findOne) with a joined unique clause doesn't work HOT 1
- Unknown column name for "The provided value for the column is too long for the column's type HOT 1
- PANIC: 1 Invalid findMany() after nested write HOT 4
- PANIC: index out of bounds: the len is 1 but the index is 1 HOT 1
- PANIC: called `Result::unwrap()` on an `Err` value: Could not parse stored DateTime string: 2020-12-09 05:49:44 (input contains invalid characters) HOT 1
- PANIC: 1 HOT 1
- Generated types (index.d.ts) contains invalid expressions HOT 4
- Hi team, i have issue with update @prisma/client 2.7 to 2.13
- Starting a postgresql pool with 17 connections. HOT 3
- Error: PrismaClient is unable to be run in the browser. HOT 6
- Testing transfer...
- Support afterCreate/afterUpdate database triggers HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prisma-client-js.