Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with arweave dep that's 1.11.4 (and potentially 1.11.1 - 1.11.4) #69

Closed
philipqnguyen opened this issue Jun 3, 2022 · 5 comments · Fixed by #70
Closed

problem with arweave dep that's 1.11.4 (and potentially 1.11.1 - 1.11.4) #69

philipqnguyen opened this issue Jun 3, 2022 · 5 comments · Fixed by #70
Assignees
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@philipqnguyen
Copy link

philipqnguyen commented Jun 3, 2022

Error when running arkb with recent changes to arweave package.

/Users/philip/.nvm/versions/node/v16.15.1/lib/node_modules/arkb/node_modules/arweave/web/lib/crypto/webcrypto-driver.js:10
            throw new Error("SubtleCrypto not available!");
            ^

Error: SubtleCrypto not available!
    at new WebCryptoDriver (/Users/philip/.nvm/versions/node/v16.15.1/lib/node_modules/arkb/node_modules/arweave/web/lib/crypto/webcrypto-driver.js:10:19)
    at Object.<anonymous> (/Users/philip/.nvm/versions/node/v16.15.1/lib/node_modules/arkb/node_modules/arweave/web/common.js:120:18)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/philip/.nvm/versions/node/v16.15.1/lib/node_modules/arkb/node_modules/arweave/web/lib/deepHash.js:3:18)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)

This seems to be the case with a fresh install of arkb with a resolved dependency of arweave@1.11.4. In order to avoid this error, I forced the dependency to arweave@1.10.23 and to smartweave@0.4.48 (the latter is needed because smartweave@0.4.49 has a dependency on arweave@1.11.4). I haven't tried arweave 1.11.1 - 1.11.3, but I suspect it's similar to 1.11.4.

This happened to me on node 18.3.0 and 16.15.1

@Dhaiwat10
Copy link

@philipqnguyen I'm facing the same error. I'm curious to learn how you forced the dependencies to a lower version?

@fuadop
Copy link
Contributor

fuadop commented Jun 6, 2022

Hi this is related to textury/arlocal#106

@fuadop fuadop added bug Something isn't working duplicate This issue or pull request already exists labels Jun 6, 2022
@ries9112
Copy link

ries9112 commented Jun 6, 2022

Facing this same issue

@philipqnguyen philipqnguyen changed the title problem with arweave dep that's > 1.11.4 (and potentially 1.11.1 - 1.11.4) problem with arweave dep that's >= 1.11.1 (and potentially 1.11.1 - 1.11.4) Jun 6, 2022
@philipqnguyen philipqnguyen changed the title problem with arweave dep that's >= 1.11.1 (and potentially 1.11.1 - 1.11.4) problem with arweave dep that's 1.11.4 (and potentially 1.11.1 - 1.11.4) Jun 6, 2022
@philipqnguyen
Copy link
Author

philipqnguyen commented Jun 6, 2022

@Dhaiwat10, I actually have arkb installed locally to a project using yarn and not global (but I have tested in both local and global install and this SubtleCrypto error is raised in both cases). To avoid the error, I was able to force the dependency to avoid using arweave@1.11.x by utilizing resolutions field in my package.json:

  "dependencies": {
    "arkb": "*"
  },
  "resolutions": {
    "arweave": "1.10.23",
    "smartweave": "0.4.48"
  }

Note that yarn respects resolutions but I'm not sure about npm. There might be a way to set the resolution in a global install, but I'm not sure.

@ries9112
Copy link

ries9112 commented Jun 8, 2022

This did not fix the issue on my end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants