question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prisma Not Allowing Server to Run Locally

See original GitHub issue

Bug description

When I use the command “npm run build” in the terminal locally I am getting the error: “Property ‘findUnique’ does not exist on type…” in every file that the function is used. This is occurring in my server/queries location. The issue is specific to the prisma function.

I am new to prisma and believe the issue is with my development environment. I believe there is something missing. The schema.prisma file and the .env file were both set up in my friends computer than set to me. All of the code works on his computer, so I know the code works and it is my development environment.

I never did prisma init. I changed the root in the .env file to match my password.

when I run prisma generate it says “Couldn’t find prisma.yml file. Are you in the right directory?” when I am in the prisma folder in my directory

If I run npx prisma generate then I get: Error: Schema parsing error: Native type DateTime is not supported for mysql connector.

How to reproduce

run npm run build in terminal

Expected behavior

npm run build should work and not give an error

Prisma information

generator client { provider = “prisma-client-js” previewFeatures = [“nativeTypes”] }

datasource db { provider = “mysql” url = env(“DATABASE_URL”) }

Environment & setup

  • OS: Mac OS
  • Database: mysql Ver 8.0.23 for macos10.15 on x86_64 (MySQL Community Server - GPL)
  • Node.js version: v14.15.4
  • Prisma version: Prisma CLI version: prisma/1.34.0 (darwin-x64) node-v10.4.1

Log:

0 info it worked if it ends with ok 1 verbose cli [ ‘/usr/local/bin/node’, ‘/usr/local/bin/npm’, ‘run’, ‘build’ ] 2 info using npm@6.14.10 3 info using node@v14.15.4 4 verbose run-script [ ‘prebuild’, ‘build’, ‘postbuild’ ] 5 info lifecycle fluence-server@1.0.0~prebuild: fluence-server@1.0.0 6 info lifecycle fluence-server@1.0.0~build: fluence-server@1.0.0 7 verbose lifecycle fluence-server@1.0.0~build: unsafe-perm in lifecycle true 8 verbose lifecycle fluence-server@1.0.0~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/philipruffini/Desktop/fluence-code/fluence/node_modules/.bin:/Users/philipruffini/.rbenv/shims:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mysql/bin 9 verbose lifecycle fluence-server@1.0.0~build: CWD: /Users/philipruffini/Desktop/fluence-code/fluence 10 silly lifecycle fluence-server@1.0.0~build: Args: [ ‘-c’, ‘tsc’ ] 11 silly lifecycle fluence-server@1.0.0~build: Returned: code: 2 signal: null 12 info lifecycle fluence-server@1.0.0~build: Failed to exec build script 13 verbose stack Error: fluence-server@1.0.0 build: tsc 13 verbose stack Exit status 2 13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:315:20) 13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:315:20) 13 verbose stack at maybeClose (internal/child_process.js:1048:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) 14 verbose pkgid fluence-server@1.0.0 15 verbose cwd /Users/philipruffini/Desktop/fluence-code/fluence 16 verbose Darwin 19.6.0 17 verbose argv “/usr/local/bin/node” “/usr/local/bin/npm” “run” “build” 18 verbose node v14.15.4 19 verbose npm v6.14.10 20 error code ELIFECYCLE 21 error errno 2 22 error fluence-server@1.0.0 build: tsc 22 error Exit status 2 23 error Failed at the fluence-server@1.0.0 build script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 2, true ]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
pruffinicommented, Feb 4, 2021

Awesome! I was missing bycryptjs

1reaction
pantharshit00commented, Feb 4, 2021

Also, @pruffini the install error is not coming from Prisma. We don’t use node-gyp. I am guessing you are using bcrypt and missing some native deps to build the bindings. Try using bcryptjs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't start Prisma local cluster on virtual private server
I'm trying to deploy with docker a local cluster using graphql create myapp and using the typscript one with authentication.
Read more >
Localhost Playground isn't allowing for the same data ...
When I run node index.js on my dev server, I am not able to make the same mutations as I can on the...
Read more >
Prisma CLI Installation (Reference)
Global installation (not recommended). While it is recommended to locally install the Prisma CLI, you can also install it globally on your machine....
Read more >
How to Run and Setup a Local PostgreSQL Database - Prisma
The next page allows you to choose which components you wish to install. You need the PostgreSQL Server and Command Line Tools selected...
Read more >
Connect your database | node-sqlserver - Prisma
Adjust the connection URL to match your setup - see Microsoft SQL Server connection URL for more information. Make sure TCP/IP connections are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found