spotfiresoftware / spotfire-wrapper

An Angular component packaged as custom elements that defined a new HTML element to display a Spotfire dashboard in a framework-agnostic way
BSD 3-Clause "New" or "Revised" License
9 stars 6 forks source link

Badly packaged library - Wrapper for TIBCO Spotfire(R) - the Angular package #75

Closed dusan-tkac closed 4 years ago

dusan-tkac commented 4 years ago

Hello,

I tried to follow instructions from https://www.npmjs.com/package/@tibco/spotfire-wrapper including creation of the new application from scratch - just making sure that Angular 9 packages are used instead of latest versions.

I installed the wrapper using npm install. I've also installed cdk, material and flex-layout.

Here are my dependencies:

  "dependencies": {
    "@angular/animations": "~9.1.12",
    "@angular/cdk": "^9.2.4",
    "@angular/common": "~9.1.12",
    "@angular/compiler": "~9.1.12",
    "@angular/core": "~9.1.12",
    "@angular/flex-layout": "^9.0.0-beta.31",
    "@angular/forms": "~9.1.12",
    "@angular/material": "^9.2.4",
    "@angular/platform-browser": "~9.1.12",
    "@angular/platform-browser-dynamic": "~9.1.12",
    "@angular/router": "~9.1.12",
    "@tibco/spotfire-wrapper": "^0.10.0",
    "rxjs": "~6.6.2",
    "tslib": "^1.10.0",
    "zone.js": "~0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.901.12",
    "@angular/cli": "~9.1.12",
    "@angular/compiler-cli": "~9.1.12",
    "@angular/language-service": "~9.1.12",
    "@types/node": "^12.11.1",
    "@types/jasmine": "~3.3.8",
    "@types/jasminewd2": "~2.0.3",
    "codelyzer": "^5.1.2",
    "jasmine-core": "~3.4.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.15.0",
    "typescript": "~3.8.3"
  }

When I try to generate viewer component using ng generate @tibco/spotfire-wrapper:dashboard --name MySpot I get

An unhandled exception occurred: Cannot find module 'C:\repos\spotfire-poc\node_modules\@tibco\spotfire-wrapper\schematics\ng-gen-dashboard\index'

When I try to include import { SpotfireViewerModule } from '@tibco/spotfire-wrapper' in my app.module.ts I get

Cannot find module '@tibco/spotfire-wrapper' or its corresponding type declarations. ts(2307)

It looks like the published npm package is not packaged correctly.

Gerromie commented 4 years ago

Sorry, @dusan-tkac ... I'll look into getting this corrected. In the meantime, can you use the work around to install the version 0.8.0?

ng add @tibco/spotfire-wrapper@0.8.0

Gerromie commented 4 years ago

Unfortunately, the modifications in the branch did not fix the ng add issue.

Gerromie commented 4 years ago

If you run the steps again, and receive an error Cannot find module '@angular/cdk/schematics', be sure to npm install @angular/cdk@10 and then run ng add @tibco/spotfire-wrapper again.