PeculiarVentures / webcrypto-liner

webcrypto-liner is a polyfill that let's down-level User Agents (like IE/Edge) use libraries that depend on WebCrypto. (Keywords: Javascript, WebCrypto, Shim, Polyfill)
MIT License
149 stars 26 forks source link

Cannot install with npm #34

Closed leolivier closed 7 years ago

leolivier commented 7 years ago

When I run: npm install --save webcrypto-liner I get:

> webcrypto-liner@0.1.20 install /home/olivier/apps/angular/knot-note/node_modules/webcrypto-liner
> npm run build
> webcrypto-liner@0.1.20 build /home/olivier/apps/angular/knot-note/node_modules/webcrypto-liner
> npm run build:es5
> webcrypto-liner@0.1.20 build:es5 /home/olivier/apps/angular/knot-note/node_modules/webcrypto-liner
> tsc
src/aes/crypto.ts(44,29): error TS7005: Variable 'additionalData' implicitly has an 'any' type.
src/aes/crypto.ts(70,29): error TS7005: Variable 'additionalData' implicitly has an 'any' type.
src/aes/crypto.ts(122,21): error TS2352: Type 'Algorithm' cannot be converted to type 'AesKeyAlgorithm'.
  Property 'length' is missing in type 'Algorithm'.
src/rsa/crypto.ts(167,29): error TS7005: Variable 'label' implicitly has an 'any' type.
src/rsa/crypto.ts(196,29): error TS7005: Variable 'label' implicitly has an 'any' type.
src/subtle.ts(66,19): error TS2354: No best common type exists among return expressions.
src/subtle.ts(114,19): error TS2354: No best common type exists among return expressions.
src/subtle.ts(147,19): error TS2354: No best common type exists among return expressions.
src/subtle.ts(194,19): error TS2354: No best common type exists among return expressions.
src/subtle.ts(235,19): error TS2354: No best common type exists among return expressions.
src/subtle.ts(272,19): error TS2354: No best common type exists among return expressions.
src/subtle.ts(398,19): error TS2354: No best common type exists among return expressions.

2017-04-07T10_37_58_018Z-debug.log.txt

See log file attached

rmhrisk commented 7 years ago

Works for me, can you tell me about your environment?

Ryans-MacBook-Pro:tmp rmh$ npm install --save webcrypto-liner

> webcrypto-liner@0.1.20 install /Users/rmh/node_modules/webcrypto-liner
> npm run build

> webcrypto-liner@0.1.20 build /Users/rmh/node_modules/webcrypto-liner
> npm run build:es5

> webcrypto-liner@0.1.20 build:es5 /Users/rmh/node_modules/webcrypto-liner
> tsc

npm WARN saveError ENOENT: no such file or directory, open '/Users/rmh/package.json'
/Users/rmh
└─┬ webcrypto-liner@0.1.20 
  ├── asmcrypto.js@0.0.11 
  ├─┬ elliptic@6.4.0 
  │ ├── bn.js@4.11.6 
  │ ├── brorand@1.1.0 
  │ ├── hash.js@1.0.3 
  │ ├── hmac-drbg@1.0.0 
  │ ├── minimalistic-assert@1.0.0 
  │ └── minimalistic-crypto-utils@1.0.1 
  └─┬ webcrypto-core@0.1.14 
    └── tslib@1.6.0 

npm WARN enoent ENOENT: no such file or directory, open '/Users/rmh/package.json'
npm WARN rmh No description
npm WARN rmh No repository field.
npm WARN rmh No README data
npm WARN rmh No license field.
Ryans-MacBook-Pro:tmp rmh$ 

For example what version of NPM are you using, what OS, etc?

leolivier commented 7 years ago

Hi You have all information at the end of the attached log file. node v7.8.0 npm v4.2.0 Linux 4.8.17-040817-generic (Mint 18)

rmhrisk commented 7 years ago

@microshine I am not sure what's different in his environment, any ideas?

Maybe TSC version?

leolivier commented 7 years ago

FYI, the issue is solved! I installed Angular 4 and the latest version of angular-cli and it seems to have installed newer versions of packages that solved the issue...