question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

reflect-metadata shim is required when using class decorators

See original GitHub issue

I am working on Angular 2… I have recently ran npm install.

the project is running on angular-cli. when I run the command ng build. I am getting the below error.

reflect-metadata shim is required when using class decorators

Please help.

Here I am attaching my package.json and screenshot. image.

package.txt

image

{ "name": "Sample Project", "version": "0.0.0", "license": "MIT", "angular-cli": {}, "scripts": { "start": "ng serve", "lint": "tslint \"src/**/*.ts\"", "test": "ng test", "pree2e": "webdriver-manager update", "e2e": "protractor" }, "private": true, "dependencies": { "@angular/common": "2.0.0-rc.5", "@angular/compiler": "2.0.0-rc.5", "@angular/core": "2.0.0-rc.5", "@angular/forms": "0.3.0", "@angular/http": "2.0.0-rc.5", "@angular/platform-browser": "2.0.0-rc.5", "@angular/platform-browser-dynamic": "2.0.0-rc.5", "@angular/router": "3.0.0-rc.1", "awesome-typescript-loader": "2.2.1", "bootstrap": "4.0.0-alpha.4", "core-js": "^2.4.0", "rxjs": "^5.0.0-beta.11", "ts-helpers": "^1.1.1", "typescript": "2.0.0", "webpack": "2.1.0-beta.21", "zone.js": "0.6.12", "loader-utils": "^0.2.16" }, "devDependencies": { "@types/jasmine": "^2.2.30", "angular-cli": "1.0.0-beta.17", "awesome-typescript-loader": "^2.2.1", "codelyzer": "~0.0.26", "jasmine-core": "2.4.1", "jasmine-spec-reporter": "2.5.0", "karma": "0.13.22", "karma-chrome-launcher": "0.2.3", "karma-jasmine": "0.3.8", "karma-remap-istanbul": "^0.2.1", "protractor": "4.0.3", "ts-node": "1.2.1", "tslint": "3.13.0", "typescript": "2.0.0", "webpack": "2.1.0-beta.21" } }

image

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Meligycommented, Feb 14, 2017

There are quite a few very old dependencies in that file. All Angular packages are from RC, the router is a version that has been rewritten 2 times since, RXJS is still beta etc.

The CLI will not support those versions or troubleshoot them I’m afraid.

My advice to you is to create a new project using the latest version of the CLI then create a new project with it, and start migrating your files to the new project. I expect it wont be an easy job because Angular must have changed a fair bit since that ancient version. but I’m afraid this is the only way to get Angular support, as RCs are not supported after Angular final was released, and the CLI itself is now using Angular 2.3 by default.

I know you said you upgraded the CLI, but I suggest you double check your installation (quite a few people thought it went well when it didn’t). The current version is beta 31. Please note that the package name changed from angular-cli to @angular/cli. You can find instructions for upgrade in the README of this repository, or in this post. Re-do the upgrade just to be safe.

Good luck.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 6, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular4 core.es5.js Uncaught reflect-metadata shim is ...
core.es5.js:354 Uncaught reflect-metadata shim is required when using class decorators. I've compared my project to a fresh ng new and they ...
Read more >
Uncaught reflect-metadata shim is required when ... - GitHub
Hi,. I have this error after migrating to webpack.8 : Uncaught reflect-metadata shim is required when using class decoratorscheckReflect.
Read more >
reflect-metadata shim is required when using class decorators
无论换哪个版本的angular,就一直报这个错,polyfills.ts明明Import了reflect-metadata还是报这个错. package.json:.
Read more >
reflect-metadata shim is required when using class decorators
This error was calling out... C:\Users\tom.jaeschke\Documents\whatever\client\node_ modules\@angular\core\bundles\core.umd.js:384.
Read more >
Angular2 - Compile Error with Decorators - help - Meteor forums
Hi I'm using Meteor Angular2. Got error during compile. ... reflect-metadata shim is required when using class decorators.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found