WalletConnect / walletconnect-utils

Javascript Utilities for WalletConnect
MIT License
113 stars 75 forks source link

Error: 'fromMiliseconds' is not exported by node_modules/@walletconnect/time/dist/cjs/index.js, imported by node_modules/@walletconnect/relay-auth/dist/esm/api.js #134

Open CherryDT opened 1 year ago

CherryDT commented 1 year ago
[!] Error: 'fromMiliseconds' is not exported by node_modules/@walletconnect/time/dist/cjs/index.js, imported by node_modules/@walletconnect/relay-auth/dist/esm/api.js
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
node_modules/@walletconnect/relay-auth/dist/esm/api.js (3:9)
1: import * as ed25519 from "@stablelib/ed25519";
2: import { randomBytes } from "@stablelib/random";
3: import { fromMiliseconds } from "@walletconnect/time";
            ^
4: import { JWT_IRIDIUM_ALG, JWT_IRIDIUM_TYP, KEY_PAIR_SEED_LENGTH, } from "./constants";
5: import { decodeIss, decodeJWT, encodeData, encodeIss, encodeJWT, } from "./utils";
Error: 'fromMiliseconds' is not exported by node_modules/@walletconnect/time/dist/cjs/index.js, imported by node_modules/@walletconnect/relay-auth/dist/esm/api.js
    at error (/mnt/c/Users/user/proj/myproject/node_modules/rollup/dist/shared/rollup.js:198:30)
    at Module.error (/mnt/c/Users/user/proj/myproject/node_modules/rollup/dist/shared/rollup.js:12555:16)
    at Module.traceVariable (/mnt/c/Users/user/proj/myproject/node_modules/rollup/dist/shared/rollup.js:12914:29)
    at ModuleScope.findVariable (/mnt/c/Users/user/proj/myproject/node_modules/rollup/dist/shared/rollup.js:11566:39)
    at FunctionScope.findVariable (/mnt/c/Users/user/proj/myproject/node_modules/rollup/dist/shared/rollup.js:6486:38)
    at Identifier.bind (/mnt/c/Users/user/proj/myproject/node_modules/rollup/dist/shared/rollup.js:7553:40)
    at CallExpression.bind (/mnt/c/Users/user/proj/myproject/node_modules/rollup/dist/shared/rollup.js:5383:23)
    at CallExpression.bind (/mnt/c/Users/user/proj/myproject/node_modules/rollup/dist/shared/rollup.js:9049:15)
    at AssignmentPattern.bind (/mnt/c/Users/user/proj/myproject/node_modules/rollup/dist/shared/rollup.js:5383:23)
    at FunctionDeclaration.bind (/mnt/c/Users/user/proj/myproject/node_modules/rollup/dist/shared/rollup.js:5379:73)
$ npm ls @walletconnect/time @walletconnect/relay-auth
myproject@0.0.1 /mnt/c/Users/user/proj/myproject
├─┬ @web3-onboard/ledger@2.5.2
│ └─┬ @walletconnect/ethereum-provider@2.9.1
│   ├─┬ @walletconnect/sign-client@2.9.1
│   │ ├─┬ @walletconnect/core@2.9.1
│   │ │ ├─┬ @walletconnect/relay-auth@1.0.4
│   │ │ │ └── @walletconnect/time@1.0.2 deduped
│   │ │ └── @walletconnect/time@1.0.2 deduped
│   │ ├─┬ @walletconnect/heartbeat@1.2.1
│   │ │ └── @walletconnect/time@1.0.2 deduped
│   │ ├── @walletconnect/time@1.0.2
│   │ └─┬ @walletconnect/utils@2.9.1
│   │   └── @walletconnect/time@1.0.2 deduped
│   ├─┬ @walletconnect/universal-provider@2.9.1
│   │ └─┬ @walletconnect/utils@2.9.1
│   │   └── @walletconnect/time@1.0.2 deduped
│   └─┬ @walletconnect/utils@2.9.1
│     └── @walletconnect/time@1.0.2 deduped
└─┬ @web3-onboard/walletconnect@2.4.6
  └─┬ @walletconnect/ethereum-provider@2.10.0
    ├─┬ @walletconnect/sign-client@2.10.0
    │ ├─┬ @walletconnect/core@2.10.0
    │ │ ├── @walletconnect/relay-auth@1.0.4 deduped
    │ │ └── @walletconnect/time@1.0.2 deduped
    │ └── @walletconnect/time@1.0.2 deduped
    └─┬ @walletconnect/utils@2.10.0
      └── @walletconnect/time@1.0.2 deduped
CherryDT commented 1 year ago

Interestingly, the error isn't always the same. Sometimes it's about ONE_MINUTE or FIVE_MINUTES.