When I install the fasade package, it hangs for unknown reason on the generate script:
> @prisma/[email protected] postinstall F:\#Projekty\#Github\typegraphql-prisma\experiments\node_modules\@prisma\photon
> node scripts/generate.js
I can abort that but then it fails to generate manually using prisma2 generate:
PS F:\#Projekty\#Github\typegraphql-prisma\experiments> npm run generate
> @ generate F:\#Projekty\#Github\typegraphql-prisma\experiments
> prisma2 generate
> Downloading windows binary for query-engine [] 100%
Generating Photon.js to ./node_modules\@prisma\photon
Error: Error: EBUSY: resource busy or locked, copyfile 'F:\#Projekty\#Github\typegraphql-prisma\experiments\node_modules\@prisma\photon\runtime\browser-chalk.d.ts' -> 'F:\#Projekty\#Github\typegraphql-prisma\experiments\node_modules\@prisma\photon\runtime\browser-chalk.d.ts'
If I remove all the files it complains about, it stops on \node_modules\@prisma\photon\runtime\index.js and I can't remove that because then Error: Cannot find module './runtime' 馃槙
If I provide a custom output path, it generates without any issue, but then it fails on making a query:
photon Request: +0ms
photon query {
photon findManyUser {
photon id
photon email
photon name
photon age
photon balance
photon amount
photon role
photon }
photon } +0ms
photon Request: +30ms
photon query {
photon findManyPost {
photon uuid
photon createdAt
photon updatedAt
photon published
photon title
photon content
photon kind
photon }
photon } +23ms
engine { PRISMA_DML_PATH:
engine 'F:\\#Projekty\\#Github\\typegraphql-prisma\\experiments\\prisma\\generated\\photon\\schema.prisma',
engine PORT: '54951',
engine RUST_BACKTRACE: '1',
engine RUST_LOG: 'info',
engine LOG_QUERIES: 'true',
engine OVERWRITE_DATASOURCES: '[]' } +0ms
engine { cwd:
engine 'F:\\#Projekty\\#Github\\typegraphql-prisma\\experiments\\prisma' } +3ms
engine:log { timestamp: 2001-11-27T10:29:35.689Z,
engine:log level: 'INFO',
engine:log target: 'prisma',
engine:log fields:
engine:log { message: 'Encountered error during initialization:',
engine:log 'log.target': 'prisma',
engine:log 'log.module_path': 'prisma',
engine:log 'log.file': 'query-engine/prisma/src/main.rs',
engine:log 'log.line': 130 } } +0ms
engine connect ECONNREFUSED 127.0.0.1:54951 +9s
I can provide more details if needed 馃槈
Thanks for reporting @MichalLytek!
As confirmed in Slack, this is fixed in the latest alpha.
The query still fails, so I reopened this.
Everything works now, closing 馃槃
It's definitely getting stuck on 2.0.0-preview017.1
@timsuchanek
Both 2.0.0-preview017.1 and 2.0.0-preview017.2 hangs on the node_modules\@prisma\photon > node scripts/generate.js 馃槙
It doesn't hang when I install in on root typegraphql-prisma that doesn't have prisma2 dependency installed - it prints the In order to use "@prisma/photon", please install prisma2 error end exit 馃槈
Thanks, @MichalLytek! Can you please describe a reproduction of how to get to the described problem?
My repository is always the best reproduction 馃槃
https://github.com/MichalLytek/type-graphql/tree/prisma
Get a Windows machine, clone the repo, go to experiments folder and run npm i - it hangs even on 018.2 preview release 馃槙

Side note: it can hang even after printing the version missmatch error
Perfect! I'll have a look 馃檪
It turns out, that this neither related to Windows, nor to Photon.js.
The typegraphql generator you have defined in https://github.com/MichalLytek/type-graphql/blob/prisma/experiments/prisma/schema.prisma#L15 simply hangs.
If I removed that generator block, it didn't hang anymore.
I've done a small improvement in the postinstall hook of @prisma/photon:
scripts/generate.js to scripts/postinstall.js just to make it clearer.prisma2 generate simply hangs)Oh, this makes sense. I think my generator tries to read photon dmmf but it's not already installed/generated yet? I will need to add some logging to file to be able to debug the generator execution.
I am not using typegraphql and it hangs as well after updating to 2.0.0-preview018.2. Works fine on 2.0.0-preview015.
EDIT.: The difference I have just noticed is that for my system it downloads debian-openssl-1.1.x in case of 2.0.0-preview018.2 and linux-glibc-libssl1.1.0 for 2.0.0-preview015.
Please create a new issue for this @cypcz if you still encounter this problem. Thanks!
Most helpful comment
Everything works now, closing 馃槃