arugaz / whatsapp-bot

Whatsapp Bot Multi Device - Node Js - Internationalization
GNU General Public License v3.0
614 stars 804 forks source link

[BUG] Error "node_modules/fastify/types/route.d.ts" #492

Closed rivai45 closed 11 months ago

rivai45 commented 11 months ago

Description

'Found 280 errors' habis 'npm run build'.
Semuanya berawalan 'node_modules/fastify/types/instance.d.ts'
*cek gambar

Kalau langsung ketik 'npm start' munculnya 

node:internal/modules/cjs/loader:1051
  throw err;
  ^

Error: Cannot find module 'D:\Github\whatsapp-bot\dist\main.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.9.0

Reproduction steps

1. 'npx run build'
2. Found 280 errors
3. 'npm start'
4. Error module

Screenshots

image

Logs

No response

Whatsapp Version

whatsapp-bot@3.0.0 build

OS

Windows

ilterugur commented 11 months ago

@rivai45 Looks like the latest version of fastify package is using typescript version ^5.2.2 and this project is using ^4.9.4 so the problem is related to this reason. Update typescript version of this project on package.json to "^5.2.2" and it should work fine.

rivai45 commented 11 months ago

@ilterugur wwhoaa.. thanks.. Yesterday I tried updating TypeScript directly, not from package.json