rnadler / ng2-password-strength-bar

Angular 2/4/5 Password Strength Bar
http://bobonmedicaldevicesoftware.com/blog/2016/12/09/publishing-an-angular-2-component-npm-package/
MIT License
20 stars 17 forks source link

NPM Install Fails with "Class 'Subject<T>' incorrectly extends base class 'Observable<T>'" #14

Closed johnfedoruk closed 6 years ago

johnfedoruk commented 7 years ago

Local Versions

NPM stderr

$ npm install > /dev/null npm WARN prepublish-on-install As of npm@5, prepublish scripts will run only for npm publish. npm WARN prepublish-on-install (In npm@4 and previous versions, it also runs for npm install.) npm WARN prepublish-on-install See the deprecation note in npm help scripts for more information. Error at /var/www/wiser/ng2-password-strength-bar/node_modules/rxjs/Subject.d.ts:16:22: Class 'Subject' incorrectly extends base class 'Observable'. Types of property 'lift' are incompatible. Type '(operator: Operator<T, R>) => Observable' is not assignable to type '(operator: Operator<T, R>) => Observable'. Type 'Observable' is not assignable to type 'Observable'. Type 'T' is not assignable to type 'R'.

npm ERR! Linux 4.4.0-79-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "ngc-build" npm ERR! node v7.4.0 npm ERR! npm v4.0.5 npm ERR! code ELIFECYCLE npm ERR! ng2-password-strength-bar@1.1.2 ngc-build: rm -rf lib && rm -rf "src/node_modules" && "node_modules/.bin/ngc" -p tsconfig-aot.json npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ng2-password-strength-bar@1.1.2 ngc-build script 'rm -rf lib && rm -rf "src/node_modules" && "node_modules/.bin/ngc" -p tsconfig-aot.json'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the ng2-password-strength-bar package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! rm -rf lib && rm -rf "src/node_modules" && "node_modules/.bin/ngc" -p tsconfig-aot.json npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs ng2-password-strength-bar npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls ng2-password-strength-bar npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /var/www/wiser/ng2-password-strength-bar/npm-debug.log

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm ERR! Linux 4.4.0-79-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" npm ERR! node v7.4.0 npm ERR! npm v4.0.5 npm ERR! code ELIFECYCLE npm ERR! ng2-password-strength-bar@1.1.2 prepublish: npm run ngc-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ng2-password-strength-bar@1.1.2 prepublish script 'npm run ngc-build'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the ng2-password-strength-bar package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run ngc-build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs ng2-password-strength-bar npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls ng2-password-strength-bar npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /var/www/wiser/ng2-password-strength-bar/npm-debug.log

joh04667 commented 6 years ago

That's from a breaking change in Typescript 2.4.2 about generic type checks. Should be able to fix locally by updating RxJS to 5.4.2, or by setting --noStrictGenericChecks option to true either in tsconfig.json or as a command line argument to tsc.

johnfedoruk commented 6 years ago

Yeah I made a pull request 19 days ago to update RXJS to 5.4.2.

johnfedoruk commented 6 years ago

It will close this issue.