Fix Yarn installation by removing package-lock.json and regenerating lockfile#23
Conversation
… issues Co-authored-by: larsdecker <1968186+larsdecker@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR migrates the repository from npm to Yarn as the primary package manager to resolve EISDIR installation errors caused by conflicting lock files. The migration updates the workspace dependency configuration, GitLab CI scripts, and project documentation.
Key Changes:
- Removed
package-lock.jsonand added it to.gitignoreto prevent npm/Yarn lock file conflicts - Fixed workspace dependency in
fints-clifromfints-lib: ^0.5.0tofints-lib: *(Yarn v1 workspace syntax) - Updated GitLab CI configuration to use
yarn global addinstead ofnpm install -gfor Lerna installation - Added development setup documentation for Yarn in README.md and PUBLISHING.md
Reviewed changes
Copilot reviewed 4 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
packages/fints-cli/package.json |
Fixed workspace dependency to use * syntax for Yarn v1 workspace linking |
.gitignore |
Added package-lock.json to prevent npm lock file from being committed |
.gitlab-ci.yml |
Updated Lerna installation to use yarn global add instead of npm install -g |
README.md |
Added Development Setup section documenting Yarn commands for contributors |
PUBLISHING.md |
Clarified Yarn is the package manager and added Yarn installation examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - yarn global add lerna | ||
| - lerna bootstrap |
There was a problem hiding this comment.
After switching to Yarn, the GitLab CI configuration should run yarn install --frozen-lockfile before lerna bootstrap to ensure dependencies are installed correctly with the Yarn lockfile. Currently, the script jumps directly to lerna bootstrap which may fail without proper dependency installation.
| - yarn global add lerna | ||
| - lerna bootstrap |
There was a problem hiding this comment.
After switching to Yarn, the GitLab CI configuration should run yarn install --frozen-lockfile before lerna bootstrap to ensure dependencies are installed correctly with the Yarn lockfile. Currently, the script jumps directly to lerna bootstrap which may fail without proper dependency installation.
| - yarn global add lerna | ||
| - lerna bootstrap |
There was a problem hiding this comment.
After switching to Yarn, the GitLab CI configuration should run yarn install --frozen-lockfile before lerna bootstrap to ensure dependencies are installed correctly with the Yarn lockfile. Currently, the script jumps directly to lerna bootstrap which may fail without proper dependency installation.
| yarn build | ||
|
|
||
| # Run tests | ||
| yarn test |
There was a problem hiding this comment.
The documentation suggests running yarn test from the root directory, but there is no test script defined in the root package.json. Consider either adding a test script to the root package.json (e.g., "test": "lerna run test") or updating the documentation to use make test or clarify that tests should be run in individual package directories.
| yarn test | |
| # (Run `yarn test` inside the relevant package directories; there is no root-level test script.) |
The repository contained both
package-lock.json(npm) andyarn.lock(Yarn), causingEISDIRerrors duringyarn install --frozen-lockfile. Additionally, the lockfile had an incorrect jest entry and the fints-cli workspace dependency was misconfigured.Changes
fints-lib: ^0.5.0tofints-lib: *(Yarn v1 workspace syntax) to properly link to the 0.6.0 workspace package.gitlab-ci.ymlto useyarn global add lernainstead ofnpm install -g lernaContext
Yarn v1 workspaces require
*for local workspace dependencies, notworkspace:*(that's a Yarn v2+ feature). The version mismatch between the CLI's expected^0.5.0and the actual0.6.0library version was causing resolution failures.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.