tycomo / ngx-ssrs-reportviewer

Simple Angular report viewer component for SQL Server Reporting Services
MIT License
52 stars 22 forks source link

ERROR in Cannot read property 'fileName' of null #33

Open geeksilva97 opened 4 years ago

geeksilva97 commented 4 years ago

Hi. Thanks for this great lib. I haven't used it yet but I know that it will help me a lot.

So I installed using the command ng add ngx-ssrs-reportviewer. And I imported on app.module.ts following the instructions. But when run ng serve I'm getting the error:

ERROR in Cannot read property 'fileName' of null

print

geeksilva97 commented 4 years ago

Is this a problem with version? Follow the configs of my project


     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/

Angular CLI: 9.0.6
Node: 10.15.1
OS: win32 x64

Angular: 9.0.6
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.6
@angular-devkit/build-angular     0.900.6
@angular-devkit/build-optimizer   0.900.6
@angular-devkit/build-webpack     0.900.6
@angular-devkit/core              9.0.6
@angular-devkit/schematics        9.0.6
@angular/cdk                      9.1.2
@angular/http                     4.4.7
@angular/material                 9.1.2
@ngtools/webpack                  9.0.6
@schematics/angular               9.0.6
@schematics/update                0.900.6
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.2
brucremo commented 3 years ago

Hi @geeksilva97! I had the same problem and solved it doing the following:

  1. Remove the package from package.json
  2. Run npm install to update your dependencies
  3. Reinstall the package

I am honestly not sure as to why it happens but simply doing this solved for me.

Hope it helps!