Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

webpack+angular2 error: Uncaught ReferenceError: __decorate is not defined

chrome console error: Uncaught ReferenceError: __decorate is not defined this is code https://github.com/Dreampie/angular2-demo

run it:

npm install

npm run typings install

npm run start

open localhost:80 in browser

someone help?

like image 781
Dreampie Avatar asked Apr 23 '16 08:04

Dreampie


2 Answers

remove from tsconfig.json

"declaration": true,
"noEmitHelpers": false,
"isolatedModules": false
like image 145
Dreampie Avatar answered Oct 17 '22 07:10

Dreampie


This happened to me when creating the code sharing NativeScript https://docs.nativescript.org/angular/code-sharing/intro

but I only had to coment out this 2 lines:

    //"declaration": false,  
    //"noEmitHelpers": true, 
like image 2
Pablo Gutierrez Avatar answered Oct 17 '22 06:10

Pablo Gutierrez