You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an application using InversifyJS (DI container) together with Vite. Inversify heavily depends on decorators. To use decorators, all necessary settings were made and the application worked.
Since version Vite 5.4.9 the application stopped working.
Uncaught TypeError: Cannot read properties of undefined (reading 'getMessage')
at ClassComponent.render (ClassComponent.tsx? [sm]:18:46)
at finishClassComponent (react-dom.development.js:19781:31)
at updateClassComponent (react-dom.development.js:19727:24)
at beginWork (react-dom.development.js:21650:16)
at HTMLUnknownElement.callCallback2 (react-dom.development.js:4164:14)
at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:16)
at invokeGuardedCallback (react-dom.development.js:4277:31)
at beginWork$1 (react-dom.development.js:27490:7)
at performUnitOfWork (react-dom.development.js:26596:12)
at workLoopSync (react-dom.development.js:26505:5)
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
There is an application using InversifyJS (DI container) together with Vite. Inversify heavily depends on decorators. To use decorators, all necessary settings were made and the application worked.
Since version Vite 5.4.9 the application stopped working.
Possible cause of errors is PR #18322
Reproduction
https://stackblitz.com/github/dbelob/vite-inversify-error
Steps to reproduce
Branch main of https://github.com/dbelob/vite-inversify-error repository (StackBlitz link: https://stackblitz.com/github/dbelob/vite-inversify-error) contains example with Vite 5.4.10 (last version) where errors are reproduced:
git clone https://github.com/dbelob/vite-inversify-error.git
cd vite-inversify-error
npm install
npm start
The browser will open automatically with errors in the console:
Branch vite-5.4.8 of https://github.com/dbelob/vite-inversify-error repository (StackBlitz link: https://stackblitz.com/github/dbelob/vite-inversify-error/tree/vite-5.4.8) contains example with Vite 5.4.8 where errors are not reproduced:
git clone -b vite-5.4.8 https://github.com/dbelob/vite-inversify-error.git vite-inversify-error-vite-5.4.8
cd vite-inversify-error-vite-5.4.8
npm install
npm start
The browser will open automatically without errors in the console.
System Info
Used Package Manager
npm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: