I canβt seem to get past this when upgrading things, installing new versions. Have tried deleting cache/node_modules and reinstalling everything. Also tried installing uint8arrays directly to no avail. Any ideas?
deleting the uint8arrays import in that file allows it to build - but not ideal solutionβ¦
Is from trying to use did-session? and what version of cacao/did-session? (does look like latest)
Also your node version?
correct - believe it was installed from did-session, node v16.16.0
thanks, which ceramic related library are you interacting with directly? (selfid?) and using with an eth account?
Not interacting with any at this point as I canβt get it to build because of that error I was in the progress of upgrading from the old IDX toolset and 1.5(ish) versions of the packages I had installed. Trying to use the following:
@ceramicnetwork/http-client - 2.13.0
@ceramicnetwork/stream-tile - 2.12.0
@glazed/devtools 0.2.0
@glazed/did-datastore 0.3.2
dids 3.4.0
key-did-provider-ed25519 2.0.1
key-did-resolver 2.3.0
Not using Eth accounts - working with the dids directly.
ok, so not using did-session or selfid, this is just failing on install? I cant really tell at which point you are ending up the dependency that is causing the error here
So all those modules install fine with no issues. Do the yarn add for each and all good. Immediately after, I try to run the build command for the app and that error shows up. If I go in and delete that unit8array line in the module code, then rerun the build command it works fine/finishes.
Hopefully that makes it more clear.
oh ok, hmm difficult to say, on thing i noticed is the version differs for uint8array in that package, maybe the package manager is not installing both versions
maybe trying forcing it to resolve the same version (dont think downgrading would cause any other issues), for yarn you could add it to resolutions in your package.json
If it does work, it may not be the best solution, but difficult to replicate without anyone else reporting, and we should probably update version in other libs.
"resolutions": {
"@didtools/cacao/uint8arrays": "^3.0.0β
}
Unfortunately, didnβt work, but using following did - hopefully wonβt cause any side effects:
"resolutions": {
"uint8arrays": "^3.0.0"
}
My yarn.lock is showing four different versions of uint8array:
- most of the ceramic packages - ^3.0.0
- @didtools/cacao@^1.0.0 - ^4.0.2
- @didtools/pkh-solana@^0.0.1 - ^3.1.0
- nist-weirstrauss ^1.3.0 (dependency of key-did-resolver ) - ^2.1.4
Ok, yeah in your setup you wont be relying on the @didtools/cacao library, should be no issue and would be obvious otherwise i think. Would be nice to find root cause, but will likely wait to see if anyone else reports before revisiting.
Iβm facing the exactly same problem. The sample app from the EthDenver workshop builds just fine (GitHub - ceramicstudio/ethdenver-workshop: Application used for the workshop at EthDenver 2023). However when I try to add those features to an existing project I get the same kind of error as reported by @Aaron. I tried the βresolutionsβ suggestion but no luck.
Copying the resolution from discord for posterity:
This is what I had to do:
"overrides": {
"uint8arrays": "^2.1.10",
"multiformats": "^9.0.0",
"@ipld/dag-cbor": "^7.0.3"
}
@spencer @zfer - build is now throwing these errors after upgrading to latest key-did-resolver (3.0.0) -
@parcel/core: Failed to resolve 'multiformats/bases/base58' from './node_modules/key-did-resolver/dist/index.js'
/home/vitalpointai/projects/guilds/node_modules/key-did-resolver/dist/index.js:184:27
183 | */ /* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @type
> 184 | import { base58btc } from 'multiformats/bases/base58';
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
185 | import * as secp256k1 from './secp256k1.js';
186 | import * as ed25519 from './ed25519.js';
Tried similar fixes to the uint8array issue above, but havenβt found a solution yet.
Iβll look in it, can you check if you have multiple versions of the βmultiformatsβ package installed?
also the original uint8arrays issue is likely resolved, i believe we updated that dependency to the same version in all ceramic related dependencies now
Looks to be a couple versions (9.9.0 and 11.0.2)
βββ¬ @ceramicnetwork/http-client@2.21.0
β βββ¬ @ceramicnetwork/common@2.24.0
β β βββ multiformats@11.0.2 deduped
β βββ¬ @ceramicnetwork/stream-model@1.6.0
β β βββ¬ @ipld/dag-cbor@7.0.3
β β β βββ multiformats@9.9.0
β β βββ multiformats@11.0.2 deduped
β β βββ¬ multihashes@4.0.3
β β βββ¬ uint8arrays@3.1.1
β β βββ multiformats@9.9.0
β βββ¬ @ceramicnetwork/streamid@2.14.0
β βββ multiformats@11.0.2 deduped
βββ¬ @glazed/devtools@0.2.0
β βββ multiformats@9.9.0
β βββ¬ uint8arrays@3.1.1
β βββ multiformats@9.9.0 deduped
βββ¬ dids@4.0.0
β βββ¬ @didtools/cacao@2.0.0
β β βββ¬ @ipld/dag-cbor@9.0.0
β β β βββ multiformats@11.0.2 deduped
β β βββ multiformats@11.0.2 deduped
β βββ¬ dag-jose-utils@3.0.0
β β βββ multiformats@11.0.2 deduped
β βββ¬ did-jwt@6.11.6
β β βββ multiformats@9.9.0
β β βββ¬ uint8arrays@3.1.1
β β βββ multiformats@9.9.0 deduped
β βββ multiformats@11.0.2
β βββ¬ uint8arrays@4.0.3
β βββ multiformats@11.0.2 deduped
βββ¬ key-did-resolver@3.0.0
βββ multiformats@11.0.2 deduped
βββ¬ nist-weierstrauss@1.6.1
βββ multiformats@9.9.0
βββ¬ uint8arrays@2.1.10
βββ multiformats@9.9.0 deduped
I have deleted node_modules/parcel-cache and reinstalled everything a couple times to make sure I was starting from a clean slate.
Ref the uint8array issue - if I remove the resolutions in the package.json, the error comes back.
@zfer - any ideas?
Hey all, Iβm having a similar issue with uint8arrays. Iβm also using parcel to build my project, and am getting this error when trying to run my dev script. I was using older package versions before and everything had built fine, and my impetus for updating was to see if it would help resolve a CORS error I encountered while testing - but now that Iβve updated them, this has cropped up.
Here are all the dependency versions Iβd like to work with:
β@ceramicnetwork/http-clientβ: β^2.21.0β,
β@ceramicnetwork/stream-tileβ: β^2.20.0β,
βbip39β: β^3.1.0β,
βdidsβ: β^4.0.0β,
βkey-did-provider-ed25519β: β^3.0.0β,
βkey-did-resolverβ: β^3.0.0β,
βparcelβ: β^2.8.3β,
βsss-wasmβ: β^0.4.0β
Iβve also tried clearing out my parcel-cache and npm_modules and reinstalled them to clean out things, but Iβm still having issues.
@cnr Was about to ask you for parcel config, but found how to reproduce it. Looking for the fix. It must be something with how Parcel handles conditional exports.
@cnr See Use `package.json#exports` map Β· Issue #4155 Β· parcel-bundler/parcel Β· GitHub If you use nightly version of parcel
, it works. uint8arrays
uses conditional exports, and GA parcel does not handle them well.