Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error "Error: Error: spawn typegraphql-prisma ENOENT" on npx prisma generate #18

Closed
Hasilt opened this issue Mar 26, 2021 · 1 comment
Labels
invalid This doesn't seem right

Comments

@Hasilt
Copy link

Hasilt commented Mar 26, 2021

I'm getting error typegraphql-prisma enoent while running prisma generate

My package.json file:

{
  "name": "prisma-nest-starter-v1",
  "version": "0.0.1",
  "description": "",
  "author": "",
  "private": true,
  "license": "UNLICENSED",
  "scripts": {
    "prebuild": "rimraf dist",
    "build": "nest build",
    "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
    "start": "nest start",
    "start:dev": "nest start --watch",
    "start:debug": "nest start --debug --watch",
    "start:prod": "node dist/main",
    "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
    "test": "jest",
    "test:watch": "jest --watch",
    "test:cov": "jest --coverage",
    "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
    "test:e2e": "jest --config ./test/jest-e2e.json"
  },
  "dependencies": {
    "@nestjs/bull": "^0.3.1",
    "@nestjs/common": "^7.5.1",
    "@nestjs/config": "^0.6.3",
    "@nestjs/core": "^7.5.1",
    "@nestjs/graphql": "^7.9.10",
    "@nestjs/jwt": "^7.2.0",
    "@nestjs/passport": "^7.1.5",
    "@nestjs/platform-express": "^7.5.1",
    "@prisma/client": "^2.17.0",
    "apollo-server-express": "^2.21.0",
    "bcrypt": "^5.0.1",
    "bull": "^3.20.1",
    "cache-manager": "^3.4.0",
    "class-transformer": "^0.4.0",
    "class-validator": "^0.13.1",
    "express-rate-limit": "^5.2.6",
    "graphql": "^15.5.0",
    "luxon": "^1.26.0",
    "otplib": "^12.0.1",
    "passport": "^0.4.1",
    "passport-jwt": "^4.0.0",
    "reflect-metadata": "^0.1.13",
    "rimraf": "^3.0.2",
    "rxjs": "^6.6.3",
    "type-graphql": "^1.1.1"
  },
  "devDependencies": {
    "@nestjs/cli": "^7.5.1",
    "@nestjs/schematics": "^7.1.3",
    "@nestjs/testing": "^7.5.1",
    "@types/bull": "^3.15.0",
    "@types/cache-manager": "^3.4.0",
    "@types/express": "^4.17.8",
    "@types/jest": "^26.0.15",
    "@types/luxon": "^1.26.2",
    "@types/node": "^14.14.6",
    "@types/passport-jwt": "^3.0.5",
    "@types/supertest": "^2.0.10",
    "@typescript-eslint/eslint-plugin": "^4.6.1",
    "@typescript-eslint/parser": "^4.6.1",
    "eslint": "^7.12.1",
    "eslint-config-prettier": "7.2.0",
    "eslint-plugin-prettier": "^3.1.4",
    "jest": "^26.6.3",
    "prettier": "^2.1.2",
    "prisma": "^2.17.0",
    "supertest": "^6.0.0",
    "ts-jest": "^26.4.3",
    "ts-loader": "^8.0.8",
    "ts-node": "^9.0.0",
    "tsconfig-paths": "^3.9.0",
    "typegraphql-nestjs": "^0.3.1",
    "typescript": "^4.0.5"
  },
  "jest": {
    "moduleFileExtensions": [
      "js",
      "json",
      "ts"
    ],
    "rootDir": "src",
    "testRegex": ".*\\.spec\\.ts$",
    "transform": {
      "^.+\\.(t|j)s$": "ts-jest"
    },
    "collectCoverageFrom": [
      "**/*.(t|j)s"
    ],
    "coverageDirectory": "../coverage",
    "testEnvironment": "node"
  }
}

prisma schema:

generator typegraphql {
  provider = "typegraphql-prisma"
  output   = "../prisma/generated/type-graphql"
}

npx prisma generate debug logs:

Environment variables loaded from .env
  prisma:engines using NAPI: false +0ms
  prisma:engines binaries to download query-engine, migration-engine, introspection-engine, prisma-fmt +2ms
Prisma schema loaded from prisma\schema.prisma
  prisma:download copying C:\Users\dell\Documents\Nest\Projects\nest-prisma-starter-v1\node_modules\.cache\prisma\master\c1455d0b443d66b0d9db9bcb1bb9ee0d5bbc511d\windows\query-engine to C:\Users\dell\AppData\Roaming\npm-cache\_npx\10468\node_modules\prisma\query-engine-windows.exe +0ms
{
  prismaClientDir: 'C:\\Users\\dell\\Documents\\Nest\\Projects\\nest-prisma-starter-v1\\node_modules\\@prisma\\client'
}
  prisma:GeneratorProcess 'typegraphql-prisma' is not recognized as an internal or external command, +0ms
  prisma:GeneratorProcess operable program or batch file. +1ms
  prisma:GeneratorProcess 2021-03-26T05:40:18.754Z prisma:client:generator requiredEngine: queryEngine +591ms

I'm not sure if this is a bug or something messed up on my system. Any help would be appreciated.

@MichalLytek
Copy link
Owner

  1. Wrong repo
  2. Already asked: Getting error on `npx prisma generate` typegraphql-prisma#86

@MichalLytek MichalLytek added the invalid This doesn't seem right label Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants