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

Ensure client works on Node 14 #1014

Open
j-5-s opened this issue Feb 19, 2022 · 6 comments
Open

Ensure client works on Node 14 #1014

j-5-s opened this issue Feb 19, 2022 · 6 comments
Labels
community kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up pi/support-1 stack/quality-velocity

Comments

@j-5-s
Copy link

j-5-s commented Feb 19, 2022

Am i correct that this update to ipns is a breaking change in that you have to be on node 16 and not 14?

when running yarn install on latest you will get:

[2/4] 🚚  Fetching packages...
error peer-id@0.16.0: The engine "node" is incompatible with this module. Expected version ">=15.0.0". Got "14.18.2"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

which comes from peer-id

➜  npm ls peer-id
image-cropper@ /Users/jamescharlesworth/projects/jvf/image-cropper
└─┬ web3.storage@3.5.4
  └─┬ ipns@0.16.0
    └── peer-id@0.16.0

@j-5-s j-5-s added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Feb 19, 2022
@filiptronicek
Copy link

I believe this was introduced in #855, upgrading to Node 16 is a good thing, but not possible everywhere: for example, Vercel allows only Node 14 and 12, so you just can't use it after the update.

@filiptronicek
Copy link

Maybe this should be rather discussed in https://github.com/libp2p/js-peer-id/, since the release that introduced this is https://github.com/libp2p/js-peer-id/releases/tag/v0.16.0 and the web3.storage team just are keeping their deps up-to-date.

@j-5-s
Copy link
Author

j-5-s commented Feb 21, 2022

Thanks, yeah, i found the issue when trying to deploy to Vercel. Should I close the issue here? Thought it may be good for other users to have visibility here as they may not be looking through issues on other dependencies, just installing web3.storage.

@filiptronicek
Copy link

I think it is important to have visibility over the changes, since not even the release notes mention further incompatibility with Node 14 (the release notes for the API - not the client library mention just an upgrade of packages: https://github.com/web3-storage/web3.storage/releases/tag/api-v5.0.6). I would like to see it at least documented well somewhere, since it indeed may be something users discover after deploying to places like Vercel.

/cc @alanshaw

@olizilla
Copy link
Contributor

olizilla commented Feb 23, 2022

oof. thanks for flagging this. We're only testing the js client in node 16 currently. I think we'd like it to work in node 14 if there is no huge engineering challenge to doing so.

Noting that Vercel won't support Node 16 until AWS fully supports Node 16, and that might not land for some months yet is a compelling reason for us to do the work to keep Node 14 supported. see: vercel/community#37

Next steps:

@olizilla olizilla changed the title update to ipns6 requires node 16 Ensure client works on Node 14 Feb 23, 2022
@olizilla
Copy link
Contributor

Also worth noting that this particular issue in the original description is on an optional extention to the client. If you are not using the new, experimental support for mutablility (see: https://github.com/web3-storage/web3.storage/blob/main/packages/client/README.md#mutability) then the code that currently depends on node16 won't even end up in your final bundle, so it would be safe to ignore that engine warning here, as a workaround in the meantime

see: https://stackoverflow.com/questions/55419708/yarn-ignore-engines-for-specific-packages

@dchoi27 dchoi27 added community P2 Medium: Good to have, but can wait until someone steps up and removed need/triage Needs initial labeling and prioritization labels Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up pi/support-1 stack/quality-velocity
Projects
None yet
Development

No branches or pull requests

4 participants