cowprotocol / cowprotocol/ethflowcontract
Add name field to package.json to fix Yarn v2+ compatibility issue
Nobody has claimed this yet.
- Dominant language
- Solidity
- Stars
- 5
- Forks
- 7
- Avg merge
- 9h 41m
- Merged PRs (30d)
- 1
Description
While trying to set up the CoW Swap repo locally and installing this package as a dependency I encountered the following error when running yarn install:
Packing @cowprotocol/ethflowcontract@https://github.com/cowprotocol/ethflowcontract.git#commit=9797105dfa25330a2e88cc4180df0fc34cf8fbbd from sources
Using Yarn Classic for bootstrap. Reason: "__metadata" key not found in yarn.lock, must be a Yarn classic lockfile
➤ YN0000: Retrieving https://classic.yarnpkg.com/latest.js
➤ YN0000: Saving the new release in .yarn/releases/yarn-1.22.22.cjs
➤ YN0000: Done in 1s 800ms
yarn install v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 6.06s.
yarn pack v1.22.22
error Package doesn't have a name.
info Visit https://yarnpkg.com/en/docs/cli/pack for documentation about this command.
My local Yarn version was 3.6, and switching to Yarn v1.22 fixed the problem.
The key difference seems to be that starting from Yarn v2, Yarn actually packs dependencies, which requires a valid name field in package.json. Yarn v1 is more lenient and doesn’t enforce this.
Adding the missing name field isn’t critical right now but would make the package more future-proof
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Update package.json with the missing package name described in the issue. Start by inspecting the repository's package.json, then run Yarn 3 installation or packaging to confirm the dependency can be packed without the Yarn v2+ compatibility error. Done means the package has a valid name and the reported error no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100