-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compiler error in TS 1.8 #15
Comments
Having same issue withTS2339 Property 'getOwnMetadata' does not exist on type 'typeof Reflect'. TypeScript |
@joesonw Are you using |
Is that a RequireJS import? I am using Angular2 with TS. When I open the Reflect.ts it says in the comments that it has no imports/exports. I am not sure how this es6 shim is getting made but it seems getOwnMetadata needs to be added. |
The easiest way to load the shim is to add this to the top of any module: import "reflect-medata"; This will both load the type information for TypeScript when it resolves the module name at compile time, and will insure that the shim is installed at runtime. |
@mcwebdev and I are both dealing with this on a current project. These are the scripts being loaded...
When adding the suggested import statement to the top of the app.component.ts file, i get and error cannot find localhost:13245/reflect-metadata.js If I put a mapping in system.config then it starts looking for crypto.js etc. It seems that the ie6 shim is interfering because it has a namespace of reflect that does not have property getOwnMetadata. Is this a loading order issue? Can someone be more specific on how to solve? The goal is to have Reflect.getOwnMetadata resolve to the property provided by reflect-metadata.js |
If you are loading via |
I added the import statement to the top of the app plus a mapping to system.config and am getting a similar error, that 'Reflect.getOwnMetadata is not a function.' Here's what's showing in the Chrome dev tools console: If I remove the entry from system.config then reflect-metadata is not found. |
Doesn't appear to be a ReflectDecorators or systemjs issue. Created a second app without ng2-bootstrap and it works fine. Created new ng2-bootstrap issue. |
Since this does not seem to be an issue with |
error TS2339: Property 'getMetadata' does not exist on type 'typeof Reflect'.
The text was updated successfully, but these errors were encountered: