Open cloudy-sfu opened 5 days ago
What`s your Node.js version? You can try using Node 18+.
Thanks. @areidx My node.js version is 12.22.9, I have now upgraded it to 20.15.0 (stable).
However, when running npm start
, it reports:
Cannot find module 'wechaty/impls' or its corresponding type declarations.
Also a lot of places report:
error TS2307: Cannot find module 'wechaty/dist/esm/src/mods/impls' or its corresponding type declarations.
And a lot of variables report:
Parameter '...' implicitly has an 'any' type.
Then, I tried to install npm install wechaty/impls
, but it fails:
node:internal/modules/cjs/loader:1145
const err = new Error(message);
^
Error: Cannot find module 'semver'
Require stack:
- /usr/share/nodejs/npm/lib/utils/unsupported.js
- /usr/share/nodejs/npm/lib/cli.js
- /usr/share/nodejs/npm/bin/npm-cli.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
at Module._load (node:internal/modules/cjs/loader:986:27)
at Module.require (node:internal/modules/cjs/loader:1233:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/usr/share/nodejs/npm/lib/utils/unsupported.js:2:16)
at Module._compile (node:internal/modules/cjs/loader:1358:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
at Module.load (node:internal/modules/cjs/loader:1208:32)
at Module._load (node:internal/modules/cjs/loader:1024:12)
at Module.require (node:internal/modules/cjs/loader:1233:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/usr/share/nodejs/npm/lib/utils/unsupported.js',
'/usr/share/nodejs/npm/lib/cli.js',
'/usr/share/nodejs/npm/bin/npm-cli.js'
]
}
When I try npm install semver
it fails as well.
I also followed https://stackoverflow.com/questions/64732623/typescript-cannot-find-module-or-its-corresponding-type-declarations and tried both npm install @types/wechaty
and npm install @types/.
where .
means current folder (wechat2tg), however both fail.
How to solve this problem? Thank you!
After running
npm start
, there is an error:How to solve it? Thank you.