Topic: Need to verify token for ng-uikit-pro-standard module install
D Smith free asked 5 years ago
We have a project using Angular CLI but when issuing ng serve
, we get the following error:
ERROR in src/app/weeklyvalidation/weeklyvalidation.component.ts(21,10): error TS2305: Module '/cmas-angular-project/node_modules/ng-uikit-pro-standard/ng-uikit-pro-standard"' has no exported member 'window'.
Could the token used in package.json be expired? How can we check (since original developer has moved on)?
NPM install command used:
npm install git+https://oauth2:{token}@git.mdbootstrap.com/mdb/angular/ng-uikit-pro-standard.git --save
D Smith free answered 5 years ago
Damian Gemza staff answered 5 years ago
Dear @D Smith
You shouldn't import window
from ng-uikit-pro-standard
, because this class is not prepared for use by our users.
Remove this import and your application should be working fine.
Best Regards,
Damian
D Smith free answered 5 years ago
NodeJS version: 10.16.0
Angular version (global): 8.0.4
snippet from package.json
:
"dependencies": {
"@angular/animations": "^7.2.3",
"@angular/common": "^7.2.3",
"@angular/compiler": "^7.2.3",
"@angular/core": "^7.2.3",
"@angular/forms": "^7.2.3",
"@angular/http": "^7.2.3",
"@angular/platform-browser": "^7.2.3",
"@angular/platform-browser-dynamic": "^7.2.3",
"@angular/router": "^7.2.3",
"@types/chart.js": "^2.7.31",
"angular5-csv": "^0.2.10",
"chart.js": "^2.5.0",
"core-js": "^2.5.4",
"easy-pie-chart": "^2.1.7",
"font-awesome": "^4.7.0",
"hammerjs": "^2.0.8",
"moment": "^2.22.2",
"ng-uikit-pro-standard": "git+https://oauth2:{OUR TOKEN}@git.mdbootstrap.com/mdb/angular/ng-uikit-pro-standard.git",
"ngx-clipboard": "^11.1.3",
"rxjs": "^6.2.2",
"screenfull": "^3.3.0",
"zone.js": "~0.8.26"
},
snippet from weeklyvalidation.component.ts
:
import { Component, OnInit , ViewChild, ElementRef, Compiler } from '@angular/core';
import {NgForm} from '@angular/forms';
//MODEL
import { WDVAbove } from '../Model/WeeklyDataValidation/Above.model';
import { WDVDpeCU } from '../Model/WeeklyDataValidation/DpeCu.model';
import { WDVDpeExcp } from '../Model/WeeklyDataValidation/DpeExcp';
import { WDVTammit } from '../Model/WeeklyDataValidation/Tammit.model';
import { Analysis } from '../Model/WeeklyDataValidation/Analysis.model';
import { ValidationSESDR } from '../Model/Validation/ValidationSESDR.model';
import { ValidationISM } from '../Model/Validation/ValidationISM.model';
import { ValidationEXCPComparasion } from '../Model/Validation /ValidationEXCPComparasion.model';
import { ValidationDPEEXCP } from '../Model/Validation/ValidationDPEEXCP.model';
import { ValidationUpdates } from '../Model/Validation/ValidationUpdates.model';
import { WeeklyvalidationService } from '../Services/weeklyvalidation.service';
import { ValidationctrlService } from '../Controllers/validationctrl.service';
import { IfStmt } from '@angular/compiler';
import { window } from 'ng-uikit-pro-standard'; ERROR IS COMING FROM HERE
import { ValidationSCORECU } from '../Model/Validation/ValidationSCORECU.model';
import { ValidationAnalysis } from '../Model/Validation/ValidationAnalysis.model';
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: 7.5.4
- Device: PC
- Browser: Firefox
- OS: MacOS
- Provided sample code: Yes
- Provided link: No
Damian Gemza staff commented 5 years ago
Dear @Dee Coder
The token is not the root of your problem. This is a strange error because we're checking our product for similar problems, and there wasn't anything similar.
Could you please provide me with the code which you're using in the weeklyvalidation.component?
Best Regards,
Damian