-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Error: version mismatch: expected v6, found v5 #1071
Comments
Note, I added this at first as a comment on ipfs/kubo#4250 which maybe a different cause, and anyway the problem/workaround occurs in JS |
this may help ipfs/js-ipfs-repo#152 |
This is correct for js-ipfs master, it should not be for js-ipfs 0.26 as deps are locked with semver. Are you sure you didn't install deps once and then switched the version? Check package-lock.json The solution @richardschneider pointed out is correct, right now it is just a question of a version number that doens't mean anything for JS land for this specific version update. Cleaning up the old repo and generating a new one should also fix it :) |
David - sorry, I don't understand your first paragraph. I'm unclear what you mean about "cleaning up the old repo" - whose repo? Mine or IPFS's and what do you mean by "clean" it. I can confirm tnow that switching package.json to ipfs: "^0.26.0" works again. |
I'm sorry, I should have been clearer. Let me explain again:
Sorry for the hiccups. js-ipfs 0.27 should be out the door in less than 2 weeks, any particular feature you are looking for? |
Thanks for clarification, I wasnt aware of this procedure requirement to remove package-lock.json before doing an npm update, usually I do an "npm update" before a bundle, just to make sure I'm testing against latest versions. I"m not installing any IPFS modules individually only "ipfs: "^0.26.0. I do install Y modules individually, including Y-ipfs-connector. Are you suggesting that package.json should include "ipfs: " Understood about cleaning repo, problem with that now is that anything I've "add'ed will get trashed since in most cases no-one will have that. For 0.27 - three issues in order of priority: The most critical thing from my perspective is the bad ongoing bugs. And #1049 which means that there is no possible way to retrieve half the files that are uploaded (via the HTTP API) from Archive.org (files.cat or dag.get fails on short (unsharded) files. That ones a big challenge because noone has even acknowledged we have a bug there despite its reproducability. Third priority would be IPNS working in JS so we can implement naming things. |
I am running IPFS 0.27, new fresh install, get the same error: Error: version mismatch: expected v6, found v5 Any work around? or revert to install an older version? |
@kevingzhang the simple workaround is to change the version number on your repo at ~/.jsipfs/version |
Thanks @diasdavid I got the work around from #270 like this |
@diasdavid I'm seeing this after updating js-ipfs from 0.26.0 to 0.27.3
with a pretty minimal config:
in ipfs-companion ipfs/ipfs-companion#320 I can remove my indexdb but i'll have to also get others who are reviewing this PR to do the same... should js-ipfs be auto-upgrading older repos? |
@olizilla see #1115. tl;dr; we should have a utility to make devs life easier, until then it is up to the app developer. @pgte developed this solution - https://github.com/ipfs-shipyard/peerpad-core/blob/master/src/backend/migrate-ipfs-repo-if-necessary.js |
Lets track repo migrations here |
Type: BUG
Severity: Critical
Description:
The latest version of JS-IPFS seems to be incompatible with the default swarm being recommended and generates the error version mismatch: expected v6, found v5
Steps to reproduce the error:
Set package.json to have ipfs: "^0.26.0" or "git+https://git@github.com/ipfs/js-ipfs.git"
Work around
Get the old version "git+https://git@github.com/ipfs/js-ipfs.git#319c1c9830262ab5c05bf99fc525d8883d3178cb",
It seems that JS's upgrade doesn't match the default swam - or at least the version of config Kyle gave us:
IPFS options :{"repo":"/tmp/ipfs_dweb20171029","config":{"Addresses":{"Swarm":["/dns4/star-signal.cloud.ipfs.team/wss/p2p-webrtc-star"]}},"EXPERIMENTAL":{"pubsub":true}},
While I have a workaround I think this is critical, because any app that updates to the IPFS v0.26 (e.g. just by running npm update) is going to break their app.
The text was updated successfully, but these errors were encountered: