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

Docs Improvements: Samples Node Version #13530

Closed
3 of 15 tasks
igordonin opened this issue May 3, 2024 · 2 comments
Closed
3 of 15 tasks

Docs Improvements: Samples Node Version #13530

igordonin opened this issue May 3, 2024 · 2 comments
Labels
needs triage This issue has not been looked into

Comments

@igordonin
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

How does anyone know in which version of Node are the samples supposed to run?
That info is not in the docs and the there's no .nvmrc

Minimum reproduction code

https://github.com/nestjs/nest/tree/master/sample/23-graphql-code-first/

Steps to reproduce

npm i

Expected behavior

I'd expect npm to install the packages, but I get errors

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @nestjs/graphql@12.0.11
npm ERR! Found: reflect-metadata@0.2.1
npm ERR! node_modules/reflect-metadata
npm ERR!   reflect-metadata@"0.2.1" from the root project
npm ERR!   peer reflect-metadata@"^0.1.12 || ^0.2.0" from @nestjs/common@10.3.2
npm ERR!   node_modules/@nestjs/common
npm ERR!     @nestjs/common@"10.3.2" from the root project
npm ERR!     peer @nestjs/common@"^9.3.8 || ^10.0.0" from @nestjs/apollo@12.0.11
npm ERR!     node_modules/@nestjs/apollo
npm ERR!       @nestjs/apollo@"12.0.11" from the root project
npm ERR!     5 more (@nestjs/core, @nestjs/graphql, @nestjs/mapped-types, ...)
npm ERR!   1 more (@nestjs/core)

Package

  • I don't know. Or some 3rd-party package
  • @nestjs/common
  • @nestjs/core
  • @nestjs/microservices
  • @nestjs/platform-express
  • @nestjs/platform-fastify
  • @nestjs/platform-socket.io
  • @nestjs/platform-ws
  • @nestjs/testing
  • @nestjs/websockets
  • Other (see below)

Other package

No response

NestJS version

10.3.2

Packages versions

{
  "name": "nest-typescript-starter",
  "version": "1.0.0",
  "description": "Nest TypeScript starter repository",
  "license": "MIT",
  "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": "echo 'No e2e tests implemented yet.'"
  },
  "dependencies": {
    "@apollo/server": "4.9.3",
    "@nestjs/apollo": "12.0.11",
    "@nestjs/common": "10.3.2",
    "@nestjs/core": "10.3.2",
    "@nestjs/graphql": "12.0.11",
    "@nestjs/platform-express": "10.3.2",
    "class-transformer": "0.5.1",
    "class-validator": "0.14.1",
    "graphql": "16.8.1",
    "graphql-query-complexity": "0.12.0",
    "graphql-subscriptions": "2.0.0",
    "reflect-metadata": "0.2.1",
    "rxjs": "7.8.1"
  },
  "devDependencies": {
    "@nestjs/cli": "10.3.2",
    "@nestjs/schematics": "10.1.1",
    "@nestjs/testing": "10.3.2",
    "@types/express": "4.17.21",
    "@types/node": "20.8.7",
    "@types/supertest": "2.0.16",
    "@typescript-eslint/eslint-plugin": "5.62.0",
    "@typescript-eslint/parser": "5.62.0",
    "eslint": "8.42.0",
    "eslint-config-prettier": "9.1.0",
    "eslint-plugin-import": "2.29.1",
    "jest": "29.7.0",
    "prettier": "3.2.5",
    "supertest": "6.3.3",
    "ts-jest": "29.1.2",
    "ts-loader": "9.5.1",
    "ts-node": "10.9.2",
    "tsconfig-paths": "4.2.0",
    "typescript": "5.3.3"
  }
}

Node.js version

20.12.2

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

@igordonin igordonin added the needs triage This issue has not been looked into label May 3, 2024
@micalevisk
Copy link
Member

that's not a issue with nodejs but a dep mismatch. I guess Renovatebot will fix that

It will work if you use the latest version of @nestjs/graphql

@igordonin
Copy link
Author

Yup, not suggesting it's a bug, just that having a .nvmrc with the node version would likely help with the correct dependencies versions. But yeah, updating dependencies versions fixed it. Thanks for your response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue has not been looked into
Projects
None yet
Development

No branches or pull requests

2 participants