Prisma Not Allowing Server to Run Locally
See original GitHub issueBug 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:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Awesome! I was missing bycryptjs
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 usingbcryptjs
.