Fastify version conflict
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Current behavior
FastifyError: fastify-plugin: fastify-accepts - expected '3.x' fastify version, '4.2.1' is installed at Object.checkVersion (D:\doatkolom\fix-npm\node_modules\fastify\lib\pluginUtils.js:118:11) at Object.registerPlugin (D:\doatkolom\fix-npm\node_modules\fastify\lib\pluginUtils.js:133:16) at Boot.override (D:\doatkolom\fix-npm\node_modules\fastify\lib\pluginOverride.js:28:57) at Plugin.exec (D:\doatkolom\fix-npm\node_modules\avvio\plugin.js:79:33) at Boot.loadPlugin (D:\doatkolom\fix-npm\node_modules\avvio\plugin.js:272:10) at processTicksAndRejections (node:internal/process/task_queues:83:21)
Steps to reproduce
No response
Expected behavior
How to fix this issue?
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
No response
Packages versions
{
"name": "nestjs",
"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/apollo": "^10.0.17",
"@nestjs/common": "^9.0.0",
"@nestjs/core": "^9.0.0",
"@nestjs/graphql": "^10.0.18",
"@nestjs/mapped-types": "*",
"@nestjs/platform-fastify": "^9.0.4",
"apollo-server-fastify": "^3.10.0",
"graphql": "^16.5.0",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^7.2.0"
},
"devDependencies": {
"@nestjs/cli": "^9.0.0",
"@nestjs/schematics": "^9.0.0",
"@nestjs/testing": "^9.0.0",
"@types/express": "^4.17.13",
"@types/jest": "28.1.4",
"@types/node": "^16.0.0",
"@types/supertest": "^2.0.11",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^8.0.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "28.1.2",
"prettier": "^2.3.2",
"source-map-support": "^0.5.20",
"supertest": "^6.1.3",
"ts-jest": "28.0.5",
"ts-loader": "^9.2.3",
"ts-node": "^10.0.0",
"tsconfig-paths": "4.0.0",
"typescript": "^4.3.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"
}
}
Node.js version
No response
In which operating systems have you tested?
- macOS
- Windows
- Linux
Other
No response
Issue Analytics
- State:
- Created a year ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
typescript - expected '^4.0.0' fastify version, '3.29.0' is installed
Recently i update my @fastify/formbody pluggin but now im having an error about a version mismatch: FastifyError [Error]: fastify-plugin: ...
Read more >apollo-server-fastify | Yarn - Package Manager
The apollo-server-fastify package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality ...
Read more >@backpock/fastify-zod - npm
Zod integration with Fastify. Latest version: 1.0.2, last published: 5 months ago. Start using @backpock/fastify-zod in your project by ...
Read more >fastify-apollo-step - npm Package Health Analysis - Snyk
Learn more about fastify-apollo-step: package health score, popularity, security, maintenance, versions and more.
Read more >Contributing - Fastify
This is so we do not conflict with any other installation of VSCode you may ... The result should be that code-fastify --version...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is most likely the issue here. Fastify v4 cannot be used with apollo-server-fastify v3. They are not compatible. This is not related to Nest, it’s a problem with the asf package. More on the linked issue
https://github.com/apollographql/apollo-server/issues/6576
https://github.com/nestjs/graphql/issues/2307