paulmillr / noble-secp256k1

Fastest 4KB JS implementation of secp256k1 signatures and ECDH
https://paulmillr.com/noble
MIT License
757 stars 114 forks source link

Error on Deno runtime #30

Closed irustm closed 2 years ago

irustm commented 2 years ago
imp

This error after 1.2.10 version

error: TS2580 [ERROR]: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.
  const nodeRequire = typeof module !== 'undefined' && typeof require === 'function';
                             ~~~~~~
    at https://deno.land/x/secp256k1@1.3.0/index.ts:1139:30

TS2580 [ERROR]: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.
  const nodeRequire = typeof module !== 'undefined' && typeof require === 'function';
                                                              ~~~~~~~
    at https://deno.land/x/secp256k1@1.3.0/index.ts:1139:63

TS2580 [ERROR]: Cannot find name 'require'. Do you need to install type definitions for

https://github.com/paulmillr/noble-secp256k1/compare/1.2.9...1.2.10#diff-e727e4bdf3657fd1d798edcd6b099d6e092f8573cba266154583a746bba0f346R858-R860

paulmillr commented 2 years ago

Use 1.3.0

irustm commented 2 years ago

In 1.3.0 same error

error: TS2580 [ERROR]: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.
  const nodeRequire = typeof module !== 'undefined' && typeof require === 'function';
                             ~~~~~~
    at https://deno.land/x/secp256k1@1.3.0/index.ts:1139:30

https://deno.land/x/secp256k1@1.3.0/index.ts#L1139

paulmillr commented 2 years ago

Fixed in 1.3.2. Make sure to read README for updated usage with Deno.