Hi guys,
I tried to deploy my third project and the second project which includes ‘socket io’.
(i emitted the ‘.’ because render thinks it’s a link)
For some unknown reason i get this error when deploting: …/backend/src/types.ts(1,48): error TS2307: Cannot find module ‘socket io’ or its corresponding type declarations.
I have no idea what went wrong, everything works fine in my machine.
I might have a beginner issue but I have no figure it out yet.
Would appreciate if some one from you can help me.
this is my github project: GitHub - danieliyahu1/pokemon-memory-game
build command: cd frontend && npm install && npm run build && cd …/backend && npm install && npm run build
package.json: {
“name”: “backend”,
“version”: “1.0.0”,
“description”: “”,
“main”: “./src/index.ts”,
“scripts”: {
“dev”: “nodemon”,
“build”: “npm install && npx tsc”,
“start”: “node ./dist/index.js”
},
“author”: “”,
“license”: “ISC”,
“dependencies”: {
“cloudinary”: “^2.4.0”,
“cors”: “^2.8.5”,
“dotenv”: “^16.4.5”,
“express”: “^4.19.2”,
“http”: “^0.0.1-security”,
“mongodb”: “^6.8.0”,
“mongoose”: “^8.5.4”,
“socket io”: “^4.7.5”
},
“devDependencies”: {
“@types/cors”: “^2.8.17”,
“@types/express”: “^4.17.21”,
“@types/node”: “^22.5.0”,
“@types/socket.io”: “^3.0.2”,
“nodemon”: “^3.1.4”,
“ts-node”: “^10.9.2”,
“typescript”: “^5.5.4”
}
}