0
When i run the command npx tsc i get the error "Package ‘graphql’ support only TS versions that are >=4.1.0". But my typescript version is 5.1.6. This is my package.json :
{
"name": "typescript",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "jest",
"start": "ts-node index.ts",
"build": "tsc",
"migrate": "ts-node -r tsconfig-paths/register ./src/migrations/migrations.ts"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.4.0",
"@fortawesome/free-solid-svg-icons": "^6.4.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"@next/font": "^13.4.12",
"@types/express": "^4.17.17",
"@types/graphql": "^14.5.0",
"@types/knex": "^0.16.1",
"@types/request-promise": "^4.1.48",
"@types/sqlite3": "^3.1.8",
"apollo-server": "^3.12.0",
"apollo-server-express": "^3.12.0",
"better-sqlite3": "^8.4.0",
"dayjs": "^1.11.9",
"eslint": "^8.45.0",
"eslint-config-next": "^13.4.12",
"express": "^4.18.2",
"graphql": "^16.7.1",
"graphql-request": "^6.1.0",
"graphql-tag": "^2.12.6",
"graphql-tools": "^9.0.0",
"graphql-yoga": "^1.18.3",
"next": "^13.4.12",
"objection": "^3.0.4",
"prisma": "^5.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.10.1",
"react-router-dom": "^6.14.2",
"request-promise": "^4.2.6",
"sqlite": "^4.2.1",
"typescript": "^5.1.6",
"yoga": "^0.0.20"
},
"devDependencies": {
"@types/accepts": "^1.3.5",
"@types/better-sqlite3": "^7.6.4",
"@types/jest": "^29.5.2",
"jest": "^29.6.1",
"knex": "^2.5.1",
"sqlite3": "^5.1.6",
"supertest": "^6.3.3",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0"
},
"jest": {
"testMatch": [
"<rootDir>/tests/**/*.test.ts"
],
"preset": "ts-jest",
"testEnvironment": "node"
}
}
and this is my tsconfig.json :
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"outDir": "dist",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
},
"include": [
"src"
, "server.ts" ,
"node_modules" ]
}
I tried downgrading the typescript version to 4.1.0 , i also deleted my node modules and installed it again.
Reset to default
Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.
Browse other questions tagged
or ask your own question.
or ask your own question.
|