prisma-client-go: Error: prisma-fmt-debian-openssl-1.1.x' was not included into executable at compilation stage

Hey Prisma team! Thank you so much for your work on the Go client!

I’m running into this error when trying to run the package to create a migration or generate the client:

$ go run github.com/prisma/prisma-client-go generate

Environment variables loaded from .env
Error: File or directory '/**/node_modules/prisma/node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x' was not included into executable at compilation stage. Please recompile adding it as asset or script.

System information: OS: Ubuntu 20.04.2 LTS on Windows 10 [WSL2] Host: x86_64 Kernel: 4.19.104-microsoft-standard Go: go1.13.8 linux/amd64

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 34 (11 by maintainers)

Most upvoted comments

The error message you are all posting indicates this comes from the CLI built with pkg: https://github.com/vercel/pkg/blob/cd5ce74ec181d0f6cd7ae0b218658b6c449e5655/prelude/bootstrap.js#L555-L566 It is not really a problem of the Go Client or Prisma CLI itself - it is the wrapper around that, which also includes some files - and for some reason it sometimes thinks these files are not present as they should be.

What is strange here of course is that it is not happening to everyone, all the time - although you are all using the same executable file downloaded from S3.

When this happens again, can you please run go run github.com/prisma/prisma-client-go -v and post its output?

This looks like an intermittent bug, so it’s incredibly hard to debug. I did some testing but couldn’t reproduce, but I know I ran into these issue myself, so I will keep re-retrying to reproduce next week. Please keep commenting should you run into this again, and add as much as information as possible (OS, go client version, whether starting in a new project or upgrading the version, etc.).

Maybe vSphrere vCenter is similar to WSL in some regard.

Setting a log env var and checking the paths would be indeed interesting:

export PHOTON_GO_LOG=info
go run github.com/prisma/prisma-client-go generate

This should log many things, but the interesting bit would be a path of a prisma engine, e.g.

/Users/luca/Library/Caches/prisma/binaries/cli/2.23.0/adf5e8cba3daf12d456d911d72b6e9418681b28b/prisma-query-engine-darwin

It should also log the download URLs of the CLI, e.g. https://prisma-photongo.s3-eu-west-1.amazonaws.com/prisma-cli-2.23.0-darwin.gz, so it would be interesting to know if downloading this file manually, unzipping and executing it works.

@VottusCode Can you please run this command yourself, get the equivalent path and check if that path exists on your file system, and if you can execute that file? Thanks!

The error message you are all posting indicates this comes from the CLI built with pkg: https://github.com/vercel/pkg/blob/cd5ce74ec181d0f6cd7ae0b218658b6c449e5655/prelude/bootstrap.js#L555-L566 It is not really a problem of the Go Client or Prisma CLI itself - it is the wrapper around that, which also includes some files - and for some reason it sometimes thinks these files are not present as they should be.

What is strange here of course is that it is not happening to everyone, all the time - although you are all using the same executable file downloaded from S3.

When this happens again, can you please run go run github.com/prisma/prisma-client-go -v and post its output?

Yeah, that’s true. Moreover, when I built the binary myself, it worked just fine.

-v returns the same error:

matherion-serdae/go-server on  develop [✘!+?] via 🐹 v1.16.5 
➜ go run github.com/prisma/prisma-client-go -v
Environment variables loaded from .env
Error: File or directory '/**/node_modules/prisma/node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x' was not included into executable at compilation stage. Please recompile adding it as asset or script.
    at error_ENOENT (pkg/prelude/bootstrap.js:446:17)
    at openFromSnapshot (pkg/prelude/bootstrap.js:487:29)
    at Object.open (pkg/prelude/bootstrap.js:523:5)
    at ReadStream.open (internal/fs/streams.js:146:13)
    at new ReadStream (internal/fs/streams.js:134:10)
    at Object.createReadStream (fs.js:1888:10)
    at Object.getHash (/snapshot/node_modules/prisma/node_modules/@prisma/engines/dist/index.js:18032:33)
    at binaryNeedsToBeDownloaded (/snapshot/node_modules/prisma/node_modules/@prisma/engines/dist/index.js:18531:48)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async /snapshot/node_modules/prisma/node_modules/@prisma/engines/dist/index.js:18435:35
Error: File or directory '/**/node_modules/prisma/node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x' was not included into executable at compilation stage. Please recompile adding it as asset or script.
    at error_ENOENT (pkg/prelude/bootstrap.js:446:17)
    at openFromSnapshot (pkg/prelude/bootstrap.js:487:29)
    at Object.open (pkg/prelude/bootstrap.js:523:5)
    at ReadStream.open (internal/fs/streams.js:146:13)
    at new ReadStream (internal/fs/streams.js:134:10)
    at Object.createReadStream (fs.js:1888:10)
    at Object.getHash (/snapshot/node_modules/prisma/node_modules/@prisma/engines/dist/index.js:18032:33)
    at binaryNeedsToBeDownloaded (/snapshot/node_modules/prisma/node_modules/@prisma/engines/dist/index.js:18531:48)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async /snapshot/node_modules/prisma/node_modules/@prisma/engines/dist/index.js:18435:35
Error: File or directory '/**/node_modules/prisma/node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x' was not included into executable at compilation stage. Please recompile adding it as asset or script.
    at error_ENOENT (pkg/prelude/bootstrap.js:446:17)
    at openFromSnapshot (pkg/prelude/bootstrap.js:487:29)
    at Object.open (pkg/prelude/bootstrap.js:523:5)
    at ReadStream.open (internal/fs/streams.js:146:13)
    at new ReadStream (internal/fs/streams.js:134:10)
    at Object.createReadStream (fs.js:1888:10)
    at Object.getHash (/snapshot/node_modules/prisma/node_modules/@prisma/engines/dist/index.js:18032:33)
    at binaryNeedsToBeDownloaded (/snapshot/node_modules/prisma/node_modules/@prisma/engines/dist/index.js:18531:48)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async /snapshot/node_modules/prisma/node_modules/@prisma/engines/dist/index.js:18435:35
Error: File or directory '/**/node_modules/prisma/node_modules/@prisma/engines/query-engine-debian-openssl-1.1.x' was not included into executable at compilation stage. Please recompile adding it as asset or script.
    at error_ENOENT (pkg/prelude/bootstrap.js:446:17)
    at openFromSnapshot (pkg/prelude/bootstrap.js:487:29)
    at Object.open (pkg/prelude/bootstrap.js:523:5)
    at ReadStream.open (internal/fs/streams.js:146:13)
    at new ReadStream (internal/fs/streams.js:134:10)
    at Object.createReadStream (fs.js:1888:10)
    at Object.getHash (/snapshot/node_modules/prisma/node_modules/@prisma/engines/dist/index.js:18032:33)
    at binaryNeedsToBeDownloaded (/snapshot/node_modules/prisma/node_modules/@prisma/engines/dist/index.js:18531:48)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
panic: could not run [-v]: exit status 1

goroutine 1 [running]:
main.main()
	/home/vottusuwu/go/pkg/mod/github.com/prisma/prisma-client-go@v0.9.0/main.go:29 +0x49b
exit status 2

Update: somehow I tried rebuilding the docker container and installed 0.8.0 again and it works fine now on the latest version.

Funny enough, tag v0.8.0 is working for me without issues now 🚀. I can finally use the generate command.

I’m also facing this issue, however I’m not running WSL. I’m running a Debian image under Docker through VSCode’s devcontainer.

Hmm, weirdly enough, I tried to run it again on my host machine which is running Manjaro, this issue happened again and taking a look at it, it seems that it is unable to run the CLI, as it is panicking at this part

prisma-client-go@v0.8.0/main.go

...
		// prisma CLI
		if err := cli.Run(args, true); err != nil {
			panic(err)
		}
...

I later then reverted to the v0.7.0 with go get github.com/prisma/prisma-client-go@v0.7.0 and it ran just fine.

I’ll stay on v0.7.0 first for now until we figure it out what was causing the issue on v0.8.0

Just to clarify. My work Ubuntu VM is not running in WSL but rather in vSphrere vCenter. But I also encountered this issue on my private WSL computer. So for me both are not working…

oops! try now :p