angular2-meteor-accounts-ui icon indicating copy to clipboard operation
angular2-meteor-accounts-ui copied to clipboard

Uncaught ReferenceError: __decorate is not defined

Open Slavrix opened this issue 7 years ago • 4 comments

I'm getting an error when using this package

Uncaught ReferenceError: __decorate is not defined

I'm using your angular-compilers atmosphere package to build the app and it used to work using angular 3.* and the angular2-compilers package, but since upgrading to angular 4.* and changing the compiler package over to the new angular-compilers I have started to see this error.

Looking around I have tried to add "noEmitHelpers": false and "importHelpers": false but it didn't help. (in tsconfig) Some have suggested changing the target to es6 but this also didn't help.

When adding "importHelpers": true I instead get a lot more errors.

C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\node_modules\typescript\lib\typescript.js:49860:18:
   Debug Failure. False expression: Too many nodes written to output.
   at extractSingleNode
   (C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\node_modules\typescript\lib\typescript.js:49860:18)
   at Object.visitNode
   (C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\node_modules\typescript\lib\typescript.js:49475:54)
   at transformCommonJSModule
   (C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\node_modules\typescript\lib\typescript.js:61216:38)
   at transformSourceFile
   (C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\node_modules\typescript\lib\typescript.js:61191:27)
   at
   C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\node_modules\typescript\lib\typescript.js:2479:86
   at reduceLeft
   (C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\node_modules\typescript\lib\typescript.js:2186:30)
   at
   C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\node_modules\typescript\lib\typescript.js:2479:42
   at transformRoot
   (C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\node_modules\typescript\lib\typescript.js:63992:82)
   at Object.map
   (C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\node_modules\typescript\lib\typescript.js:1693:29)
   at Object.transformNodes
   (C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\node_modules\typescript\lib\typescript.js:63980:30)
   at Object.emitFiles
   (C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\node_modules\typescript\lib\typescript.js:66715:28)
   at emitWorker
   (C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\node_modules\typescript\lib\typescript.js:70241:33)
   at
   C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\node_modules\typescript\lib\typescript.js:70203:66
   at runWithCancellationToken
   (C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\node_modules\typescript\lib\typescript.js:70295:24)
   at Object.emit
   (C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\node_modules\typescript\lib\typescript.js:70203:20)
   at Object.getEmitOutput
   (C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\node_modules\typescript\lib\typescript.js:91775:38)
   at CompileService.compile
   (C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\dist\compile-service.js:56:33)
   at compile
   (C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\dist\index.js:204:37)
   at
   C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\dist\index.js:219:18
   at CompileCache.CCp.get
   (C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\dist\cache.js:163:19)
   at TSBuild.emit
   (C:\Users\rusty\AppData\Local\.meteor\packages\angular-compilers\0.2.8_1\plugin.Angular_Compilers.os\npm\node_modules\meteor\angular-typescript-compiler\node_modules\meteor-typescript\dist\index.js:216:33)
   at AngularTsCompiler.processFilesForTarget (packages/angular-typescript-compiler/index.js:221:36)

I'm only using this package for its ability to do the @Injectuser, does one of your updated packages do this these days? Or is there something I'm missing that is causing this issue? The package is over a year old now so I wanted to check here first before I started looking for a different solution if it isn't being maintained.

Slavrix avatar Nov 20 '17 13:11 Slavrix

I installed ts-helpers and imported it into the main.ts but then instead I started getting a different error Cannot find module './app.component.html'

ts-helpers itself says that it shouldn't be needed anymore so I feel that there is an update to this package that may be required (or a link to a newer version if there is one)

Slavrix avatar Nov 20 '17 14:11 Slavrix

I've been trying to get the AOT compiling working and it was moaning about this package. I removed it from my app.module.ts and my app still appears to work and be able to login and logout.

I've not done any extensive testing on this yet but it may be worth trying to remove it altogether.

pmcochrane avatar Nov 21 '17 14:11 pmcochrane

I am also getting the error Uncaught ReferenceError: __decorate is not defined at app.component.ts:12 while using angular-meteor package. No clue what to do..

Adding importHelpers as true creates a lot of errors about missing tslib module for each angular component. The app works but my styles are gone :(

mattiLeBlanc avatar Jan 01 '18 06:01 mattiLeBlanc

With my Angular/Meteor project I ran into a similar issue, trying to move to angular-compilers from angular2-compiler, but I get: Uncaught ReferenceError: __extends is not defined

When using importHelpers: true I have the same type of error stack. I don't think it is related with accounts-ui as I am not using this package.

Did someone manage to get his work?

pbureau avatar Feb 18 '18 15:02 pbureau