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.

Getting "__decorate is not defined" when importing Angular 2 Components

See original GitHub issue

Because they are using the “@Component” decorator

 ● Test suite failed to run
    ReferenceError: __decorate is not defined

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
kulshekharcommented, Mar 15, 2017

no problem 😃

0reactions
BenLorantfycommented, Sep 5, 2018

This doesn’t seem to work anymore. Need to do this instead: https://github.com/kulshekhar/ts-jest#tsconfig

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular2 decorators are not defined - typescript - Stack Overflow
My project builds with webpack but when I host the app from localhost I get an error. Uncaught ReferenceError: __decorate is not defined....
Read more >
Introduction to Angular concepts
The @Component() decorator identifies the class immediately below it as a component, and provides the template and related component-specific metadata.
Read more >
Feature modules - Angular
In the CLI generated feature module, there are two JavaScript import statements at the top of the file: the first imports NgModule ,...
Read more >
Cheat Sheet - Angular
Bootstraps the application, using the root component from the specified NgModule . NgModules, Details. import { NgModule } ...
Read more >
Add services - Angular
The @Injectable() decorator accepts a metadata object for the service, the same way the @Component() decorator did for your component classes. Get hero...
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