Angular-cli: Uncaught reflect-metadata shim is required when using class decorators

Created on 22 Jan 2017  路  3Comments  路  Source: angular/angular-cli

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

macOS Sierra

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

Running of angular/angular-cli#master

angular-cli: 1.0.0-beta.26
node: 7.2.0
os: darwin x64
@angular/common: 2.4.4
@angular/compiler: 2.4.4
@angular/core: 2.4.4
@angular/forms: 2.4.4
@angular/http: 2.4.4
@angular/platform-browser: 2.4.4
@angular/platform-browser-dynamic: 2.4.4
@angular/router: 3.4.4
@angular/compiler-cli: 2.4.4

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

$ ng new reflect-metadata-issue
$ cd reflect-metadata-issue
$ ng serve

Now open in the browser and view the console to get this error message
Uncaught reflect-metadata shim is required when using class decorators

The log given by the failure.

Normally this include a stack trace and some more information.

Mention any other details that might be useful.

As said above, this is running the current master


Thanks! We'll be in touch soon.

Most helpful comment

@clydin suggested in slack that the issue is related to #3812.

The workaround is adding import './polyfills'; to src/main.ts.

All 3 comments

@clydin suggested in slack that the issue is related to #3812.

The workaround is adding import './polyfills'; to src/main.ts.

False alarm. Thanks to @clydin for reminding me to npm link angular-cli .

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jmurphzyo picture jmurphzyo  路  3Comments

NCC1701M picture NCC1701M  路  3Comments

5amfung picture 5amfung  路  3Comments

brtnshrdr picture brtnshrdr  路  3Comments

gotschmarcel picture gotschmarcel  路  3Comments