Azure-Samples / powerbi-angular-client

PowerBI sample demonstrating use of angular-powerbi
http://azure-samples.github.io/powerbi-angular-client
MIT License
21 stars 18 forks source link

Sample Fails to Build #3

Closed slmmm closed 8 years ago

slmmm commented 8 years ago

Followed the Readme, but this sample fails gulp build.

Initial issue was error "Cannot find module 'gulp-load-plugins'" -- I resolved by running npm install gulp-load-plugins.

Now gulp build fails with numerous errors that start out like below. What step(s) is missing from the build to correct this sample?

[06:33:43] Starting 'compile:src'... ts-loader: Using typescript@1.8.10 and C:\Users\slmmm\Documents\msPowerBi\tsconfig.json { [Error: C:\Users\slmmm\Documents\msPowerBi\node_modules\angular-powerbi\dist\components\powerbi-component\component.d.ts (6,18): error TS2305: Module '"C:/Users/slmmm/Documents/msPowerBi/node_modules/powerbi-client/dist/powerbi"' has no exported member 'IEmbedConfiguration'.C:\Users\slmmm\Documents\msPowerBi\node_modules\angular-powerbi\dist\components\powerbi-component\component.d.ts (11,25): error TS2503: Cannot find namespace 'ng'.C:\Users\slmmm\Documents\msPowerBi\node_modules\angular-powerbi\dist\components\powerbi-component\component.d.ts (43,18): error TS2503: Cannot find namespace 'ng'.C:\Users\slmmm\Documents\msPowerBi\node_modules\angular-powerbi\dist\components\powerbi-component\component.d.ts (43,38): error TS2503: Cannot find namespace 'ng'.C:\Users\slmmm\Documents\msPowerBi\node_modules\angular-powerbi\dist\services\powerbi.d.ts

mattmazzola commented 8 years ago

Hi, I just pushed a dev branch which should build without errors now. Add gulp-load-plugins as a dependency and fixed some other things with the package dependencies / gulpfile. Let me know if it at least builds for you.

Although it may not help much. The actual demo on the dev branch is still relying on embedding using some server-side code that isn't deployed yet. You see the code which overrides the normal embed url with a custom one which isn't available. Hopefully we can get this updated soon so everyone can see the new features. Technically the master branch shouldn't have been updated with the new stuff yet so we might revert it but given that might happen soon i'm not sure if it will just be noise on the history.

slmmm commented 8 years ago

Thanks for helping to resolve this. With the dev branch it does go a little further but still getting multiple similar errors from ts-loader like the below.

C:\Users\slmmm\Documents\powerbi-angular-client>gulp build (node:12864) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version. [11:13:39] Using gulpfile ~\Documents\powerbi-angular-client\gulpfile.js [11:13:39] Starting 'build'... [11:13:39] Starting 'compile:src'... ts-loader: Using typescript@1.8.10 and C:\Users\slmmm\Documents\powerbi-angular-client\tsconfig.json { [Error: C:\Users\slmmm\Documents\powerbi-angular-client\node_modules\angular-powerbi\dist\components\powerbi-component\component.d.ts (12,25): error TS2503: Cannot find namespace 'ng'.C:\Users\slmmm\Documents\powerbi-angular-client\node_modules\angular-powerbi\dist\components\powerbi-component\component.d.ts (45,18): error TS2503: Cannot find namespace 'ng'.C:\Users\slmmm\Documents\powerbi-angular-client\node_modules\angular-powerbi\dist\components\powerbi-component\component.d.ts (45,38): error TS2503: Cannot find namespace 'ng'.C:\Users\slmmm\Documents\powerbi-angular-client\node_modules\powerbi-router\dist\router.d.ts (5,61): error TS2304: Cannot find name 'Promise'.C:\Users\slmmm\Documents\powerbi-angular-client\node_modules\http-post-message\dist\httpPostMessage.d.ts (15,51): error TS2304: Cannot find name 'Promise'.C:\Users\slmmm\Documents\powerbi-angular-client\node_modules\http-post-message\dist\httpPostMessage.d.ts

mattmazzola commented 8 years ago

Did you run typings install?

It looks like it's complaining about not having type definitions declaring ng or Promise. ng should be defined in the angular.d.ts file and Promise should be defined in the es6-promise .d.ts file.

I think that would fix your issue. I updated the README to include this step in installation instructions.

slmmm commented 8 years ago

Per your updated Readme - I have done "typings install" and the build issues are resolved. Thanks!

wbreza commented 8 years ago

Great to hear!