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
Tried to deploy a project without any change to package,json and was greeted with this error:
TypeError: Cannot read properties of undefined (reading 'prototype')
at Reflector.isConstructor (...\node_modules\ts-convict\dist\Reflector.js:12:26)
at TSConvict.getSchemaFor (...\node_modules\ts-convict\dist\TSConvict.js:79:37)
at new TSConvict (...\node_modules\ts-convict\dist\TSConvict.js:28:28)
...
Looking at the generated JavaScript code, the error was occurring for all__decorate calls except first one
In the example above, debug and anything below resulted in error. If I removed nodeEnv then debug worked fine but anything below - error again.
The problem happens because ts-convict@1.1.0 and reflect-metadata@0.2.1 seem to be incompatible. The version specified in this module is "reflect-metadata": "^0.1.13" which results in installing latest version. I am not sure if the problem is in reflect-metadata. For me the solution was to specify a fixed version of reflect-metadata in my project's package.json:
"reflect-metadata": "0.1.13"
The text was updated successfully, but these errors were encountered:
Tried to deploy a project without any change to package,json and was greeted with this error:
Looking at the generated JavaScript code, the error was occurring for all
__decorate
calls except first oneIn the example above,
debug
and anything below resulted in error. If I removednodeEnv
thendebug
worked fine but anything below - error again.The problem happens because
ts-convict@1.1.0
andreflect-metadata@0.2.1
seem to be incompatible. The version specified in this module is"reflect-metadata": "^0.1.13"
which results in installing latest version. I am not sure if the problem is inreflect-metadata
. For me the solution was to specify a fixed version of reflect-metadata in my project'spackage.json
:The text was updated successfully, but these errors were encountered: