Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Error compiling template ng-admin-pro-6.1.1

birmain pro asked 6 years ago


After doing a clean installation and compiling the ng-admin-pro.6.1.1 template, when doing the TypeScript syntactic verification it presents this stack of errors ERROR in node_modules/angular-calendar/dist/esm/src/components/day/calendarDayView.component.d.ts(3,10): error TS2305: Module '"F:/ng-admin-pro-6.1.1/node_modules/rxjs/Subject"' has no exported member 'Subject'. node_modules/angular-calendar/dist/esm/src/components/day/calendarDayView.component.d.ts(4,10): error TS2305: Module '"F:/ng-admin-pro-6.1.1/node_modules/rxjs/Subscription"' has no exported member 'Subscription'. node_modules/angular-calendar/dist/esm/src/components/month/calendarMonthView.component.d.ts(3,10): error TS2305: Module '"F:/ng-admin-pro-6.1.1/node_modules/rxjs/Subject"' has no exported member 'Subject'. node_modules/angular-calendar/dist/esm/src/components/month/calendarMonthView.component.d.ts(4,10): error TS2305: Module '"F:/ng-admin-pro-6.1.1/node_modules/rxjs/Subscription"' has no exported member 'Subscription'. node_modules/angular-calendar/dist/esm/src/components/week/calendarWeekView.component.d.ts(2,10): error TS2305: Module '"F:/ng-admin-pro-6.1.1/node_modules/rxjs/Subject"' has no exported member 'Subject'. node_modules/angular-calendar/dist/esm/src/components/week/calendarWeekView.component.d.ts(3,10): error TS2305: Module '"F:/ng-admin-pro-6.1.1/node_modules/rxjs/Subscription"' has no exported member 'Subscription'. node_modules/angular-resizable-element/dist/esm/src/resizable.directive.d.ts(2,10): error TS2305: Module '"F:/ng-admin-pro-6.1.1/node_modules/rxjs/Subject"' has no exported member 'Subject'. node_modules/rxjs/Subject.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Subject'. node_modules/rxjs/Subscription.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Subscription'. src/app/views/event-calendar/event-calendar.component.ts(8,10): error TS2305: Module '"F:/appIonic/ng-admin-pro-6.1.1/node_modules/rxjs/Subject"' has no exported member 'Subject'.

Damian Gemza staff commented 6 years ago

Dear birmain, Could you please provide me reproduction steps? ng-admin-pro was checked for errors, and we didn't see any of those. Best Regards, Damian

birmain pro answered 6 years ago


I downloaded the current template 6.1.2 - npm instal - ng serve "Versions of @ angular / compiler-cli and typescript could not be determined. The most common reason for this is a broken npm install. Please make sure your package.json contains both @ angular / compiler-cli and typescript in devDependencies, then delete node_modules and package-lock.json (if you have one) and run npm install again. "   - Remove node_modules and package-lock.json - npm install - ng serve It returns to give exactly the same error that I show you in the previous message. This is my environment: Angular CLI: 6.0.7 Node: 8.11.1 OS: win32 x64 Angular: 6.0.3 ... animations, common, compiler, compiler-cli, core, forms ... http, platform-browser, platform-browser-dynamic, router Package Version -------------------------------------------------- --------- @ angular-devkit / architect 0.6.7 @ angular-devkit / build-angular 0.5.13 @ angular-devkit / build-optimizer 0.5.13 @ angular-devkit / core 0.6.7 @ angular-devkit / schematics 0.6.7 @ angular / cli 6.0.7 @ ngtools / webpack 6.0.0-rc.11 @ schematics / angular 0.6.7 @ schematics / update 0.6.7 rxjs 6.2.0 typescript 2.7.2 webpack 4.10.2

Damian Gemza staff commented 6 years ago

I'm unable to reproduce your case. Could you try to remove typescript, @angular/cli and @angular/compiler-cli from package.json dependencies and try one more time to remove node_modules. package-lock.json and npm install? It should help with this case. Best Regards, Damian

alain.deurveilher@gmail.com pro commented 6 years ago

Damian, I just tried exactly that with the version 6.1.2 and I have the issue. (I was about to create a new issue, but saw that this one was already created). Additionally to removing the dups I also used a fixed version of TypeScript: "typescript": "2.7.2" to fix another compilation error. But the error is there. Because the package in angular-calendar still import Subject from 'rxjs/Subject', Subscription from 'rxjs/Subscription', etc. while they all must be imported from just 'rxjs' as you already know. Because of this package not updated to rxjs 6, I think you need to add the rxjs-compat dependency ?

birmain pro commented 6 years ago

The same error persists. The cause I think is the one commented by the user alain.deurveilher@gmail.com

Damian Gemza staff commented 6 years ago

Dear Alain, Birmain, Could you guys please try to install rxjs-compat? It should fix your problem, but I'm unable to reproduce your problems, because for me, with MDB Angular Admin Template Pro zip everything is working just fine. Please let me know. Best Regards, Damian

alain.deurveilher@gmail.com pro commented 6 years ago

In the end, I removed the node_modules folder, the package-lock.json, used the fixed version "0.25.2" of angular-calendar, and re npm i everything. The problem was gone, all was working perfectly ! My goal was to try to build for production (ng build --configuration=production) and it's all good. Thanks.

birmain pro commented 6 years ago

The solution has been to unzip an original folder from ng-admin-pro-6.1.2. After: npm install rxjs-compat npm install once finished it compiles perfectly


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags