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

yarn is not installing properly on MacOSX and Windows #1246

Closed
jan-vcapgemini opened this issue Jul 10, 2023 · 2 comments · Fixed by #1270
Closed

yarn is not installing properly on MacOSX and Windows #1246

jan-vcapgemini opened this issue Jul 10, 2023 · 2 comments · Fixed by #1270
Assignees
Labels
bug Something isn't working

Comments

@jan-vcapgemini
Copy link
Contributor

Expected behavior

As a devonfw-ide Windows and MacOS user I want to install yarn, so that I can use it for my projects.

Actual behavior

devon yarn is not installed automatically (just with devon yarn setup)

Steps to reproduce (bug) / Use Case of feature request (enhancement)

  1. Run devon yarn

Related/Dependent Issues

Comments/Hints:

Affected version:

  • OS: Mac, Windows
  • devonfw-ide: 2023.07.001-SNAPSHOT
@jan-vcapgemini jan-vcapgemini added the bug Something isn't working label Jul 10, 2023
@jan-vcapgemini jan-vcapgemini added this to the release:2023.07.001 milestone Jul 10, 2023
@hohwille
Copy link
Member

Please try to include logs, as I could not get what the actual problem was and could not reproduce the bug in the first place.
So here is my log:

hohwille@CE49454 MSYS /d/projects/test2
$ devon yarn
Running: yarn install
/d/projects/test2/scripts/command/yarn: line 84: yarn: command not found
sed: can't read package.json: No such file or directory
No build script is present in package.json - skipping to run build script.

hohwille@CE49454 MSYS /d/projects/test2
$ devon yarn setup
Running: npm install -g yarn@latest

added 1 package in 1s

hohwille@CE49454 MSYS /d/projects/test2
$ devon yarn
Running: yarn install
yarn install v1.22.19
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 0.05s.
sed: can't read package.json: No such file or directory
No build script is present in package.json - skipping to run build script.

@hohwille
Copy link
Member

I am slightly confused why this is happening.
If you call devon yarn with no argument, it will do this:

This is calling the following:

And that first calls this:

The actual bug seems to come from this condition:

elif [ "${1}" != "silent" ] || [ "${version}" != "latest" ]

Typically the silent argument should only suppress extra log output or extra verbose double checking of the installation.
However, in the current yarn commandlet the installation is simply skipped if the silent argument is provided what is obviously a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants