Skip to content

Fix Yarn installation by removing package-lock.json and regenerating lockfile#23

Merged
larsdecker merged 2 commits intomasterfrom
copilot/fix-installation-errors
Dec 23, 2025
Merged

Fix Yarn installation by removing package-lock.json and regenerating lockfile#23
larsdecker merged 2 commits intomasterfrom
copilot/fix-installation-errors

Conversation

Copy link
Copy Markdown

Copilot AI commented Dec 23, 2025

The repository contained both package-lock.json (npm) and yarn.lock (Yarn), causing EISDIR errors during yarn install --frozen-lockfile. Additionally, the lockfile had an incorrect jest entry and the fints-cli workspace dependency was misconfigured.

Changes

  • Removed package-lock.json and added to .gitignore to prevent future conflicts
  • Fixed workspace dependency: Changed fints-cli's dependency from fints-lib: ^0.5.0 to fints-lib: * (Yarn v1 workspace syntax) to properly link to the 0.6.0 workspace package
  • Regenerated yarn.lock to resolve jest version conflicts and ensure consistent dependency resolution
  • Updated CI configuration: Changed .gitlab-ci.yml to use yarn global add lerna instead of npm install -g lerna
  • Updated documentation: Clarified in README.md and PUBLISHING.md that Yarn is the primary package manager for development

Context

Yarn v1 workspaces require * for local workspace dependencies, not workspace:* (that's a Yarn v2+ feature). The version mismatch between the CLI's expected ^0.5.0 and the actual 0.6.0 library version was causing resolution failures.

Original prompt

Die automatischen Tests schlagen zum Teil fehl, aufgrund von Installationsproblemen.

Run yarn install --frozen-lockfile
yarn install v1.22.22
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
warning Lockfile has incorrect entry for "jest@^29.7.0". Ignoring it.
[2/4] Fetching packages...
node:events:502
throw er; // Unhandled 'error' event
^

Error: EISDIR: illegal operation on a directory, read
Emitted 'error' event on ReadStream instance at:
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -21,
code: 'EISDIR',
syscall: 'read'
}

Node.js v20.19.6
Error: Process completed with exit code 1.

Kannst du bitte alles auf Yarn umstellen und das auch in der Readme dann entsprechend erwähnen.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

… issues

Co-authored-by: larsdecker <1968186+larsdecker@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix automatic tests installation issues Fix Yarn installation by removing package-lock.json and regenerating lockfile Dec 23, 2025
Copilot AI requested a review from larsdecker December 23, 2025 20:07
@larsdecker larsdecker marked this pull request as ready for review December 23, 2025 20:45
Copilot AI review requested due to automatic review settings December 23, 2025 20:45
@larsdecker larsdecker merged commit 8e38e49 into master Dec 23, 2025
7 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json and added it to .gitignore to prevent npm/Yarn lock file conflicts
  • Fixed workspace dependency in fints-cli from fints-lib: ^0.5.0 to fints-lib: * (Yarn v1 workspace syntax)
  • Updated GitLab CI configuration to use yarn global add instead of npm install -g for 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.

Comment thread .gitlab-ci.yml
Comment on lines +16 to 17
- yarn global add lerna
- lerna bootstrap
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread .gitlab-ci.yml
Comment on lines +30 to 31
- yarn global add lerna
- lerna bootstrap
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread .gitlab-ci.yml
Comment on lines +45 to 46
- yarn global add lerna
- lerna bootstrap
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread README.md
yarn build

# Run tests
yarn test
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
yarn test
# (Run `yarn test` inside the relevant package directories; there is no root-level test script.)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants