Primeng: Uncaught TypeError: this._reflector.guards is not a function

Created on 16 Jan 2018  路  15Comments  路  Source: primefaces/primeng

I'm submitting a ... (check one with "x")

[ X] bug report => Search github for a similar issue or PR before submitting

Current behavior
clone the repository
ng build
ng serve
console exception with that message

Expected behavior
no exception

Please tell us about your environment:
Windows 10

  • Angular version: 2.0.X
    5.2.0

  • PrimeNG version: 2.0.X
    5.0.3-SNAPSHOT

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
    Chrome

Most helpful comment

Hey so why was is this closed? did someone figure it out? It didn't work for me.

All 15 comments

So apparently this will be an issue with @angular 5.2.0 - is not an issue with 5.1.1

This happened to us before and upgrading node.js fixes it.

Running the most recent version of nodejs - kinda hard to update it

Hey so why was is this closed? did someone figure it out? It didn't work for me.

Same issue here, latest version of nodejs. Please reopen it

As @MHacker9404 said: "this will be an issue with @angular 5.2.0 - is not an issue with 5.1.1"
No need to update node.js

In your package.json file:

  • set @angular/... dependencies to "~5.1.0"
  • delete node_modules folder
  • do a fresh npm install under your project
  • ng serve

I am still having this issue, tried angular 5.2.5, switched to 5.1.0 , the issue persists.
Node.js is 9.5.0

I had the same issue after importing a project and trying to do npm install and get my node_modules from package.json file.
The main cause is probably the incompatibility between versions in your project.
I resolved this with upgrading my general modules & workspace modules.

Steps to reproduce:

  • Remove node_modules folder from your project (rm -rf ./node_modules)
  • sudo npm install -g npm-check-updates if you don't have it
  • ncu -u in your project workspace where is located package.json file
  • Then sudo npm install
  • ncu -g to check outdated general modules
  • sudo npm install -g {OUTDATED_MODULE} for each outdated module you have in your general modules list

It seems issue resolved with ionic cli v3.20.0.
I donot test primeng

cli packages: (d:\program\nvm\v8.10.0node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 7.1.0
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node              : v8.10.0
npm               : 5.6.0
OS                : Windows 7

  "dependencies": {
    "@angular/common": "~5.2.9",
    "@angular/compiler": "~5.2.9",
    "@angular/compiler-cli": "~5.2.9",
    "@angular/core": "~5.2.9",
    "@angular/forms": "~5.2.9",
    "@angular/http": "~5.2.9",
    "@angular/platform-browser": "~5.2.9",
    "@angular/platform-browser-dynamic": "~5.2.9",

Hola si es en ionic lo resolvi con
ionic cordova platform rm android
ionic cordova platform add android
resulta que habian algunos plugin que no se instalaron funciono para mi agradezco los comentarios

no entiendo @ivancho2802 , que relaci贸n tiene ese error con la soluci贸n?

hola @matiasAS las plataformas de cordova para mi no se ejecutaban de manera correcta por una mala instalaci贸n tal vez...
al reinstalarlos ionic o los plugin reaccionaron de manera correcta...
recuerdo que tambien borre el cache de node con
npm cache verify
npm cache clean

so, how do we solve this issue? any ideas or did someone put an end to it already, please let me know @serdanilov @MHacker9404 @cagataycivici @SickBeat @xblaster @balazs630

Faced this issue with angular 5.1.1 and node version 8.15.0. Is this issue is solved or not?

I have the same problem here, I have removed and added the folders but still resolving the same error when installing the android apk or running "ionic cordova run browser"

my info

@ionic/cli-utils : 1.19.3
ionic (Ionic CLI) : 3.20.1

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

@ionic/app-scripts : 3.2.4
Cordova Platforms  : android 8.0.0
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node              : v8.15.0
npm               : 6.4.1
OS                : macOS
Xcode             : Xcode 10.3 Build version 10G8

Environment Variables:

ANDROID_HOME : /Users/user/Library/Android/sdk

Misc:

backend : pro
Was this page helpful?
0 / 5 - 0 ratings

Related issues

SchneMa picture SchneMa  路  3Comments

philly-vanilly picture philly-vanilly  路  3Comments

miresk picture miresk  路  3Comments

garethlewis picture garethlewis  路  3Comments

Faigjaz picture Faigjaz  路  3Comments