'Local server won't start TS-Error Container TS2345 NodeJS?

I'm trying to run a test project on the server. Gives an error message

~/www/ork-wiki-admin-back-test $ npm run test-start

> [email protected] test-start /var/www/ork-wiki-admin-back-test
> tsc && yarn copy-files && NODE_ENV=testing forever start --id='ork_wiki_admin_back_test' dist/index.js

src/index.ts:22:43 - error TS2345: Argument of type 'import("/var/www/ork-wiki-admin-back-test/node_modules/inversify/dts/container/container").Container' is not assignable to parameter of type 'import("/var/www/ork-wiki-admin-back-test/node_modules/inversify-express-utils/node_modules/inversify/lib/interfaces/interfaces").interfaces.Container'.
Type 'Container' is missing the following properties from type 'Container': rebindAsync, unbindAsync, unbindAllAsync, isCurrentBound, and 9 more.

22 const server = new InversifyExpressServer(diContainer);
~~~~~~~~~~~

Found 1 error in src/index.ts:22

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] test-start: `tsc && yarn copy-files && NODE_ENV=testing forever start --id='ork_wiki_admin_back_test' dist/index.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] test-start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

I've been trying for two days now and can't figure out what's wrong. How can this problem be solved ?



Solution 1:[1]

I had this same problem and it was due to mismatched versions. I updated inversify to v6.0.1 and inversify-express-utils to v6.3.2 and the error was resolved. Hope this helps!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jeremy O'Keefe