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

[Bug] running just yarn doesn't install #738

Open
1 task done
Haroenv opened this issue Jan 24, 2020 · 20 comments
Open
1 task done

[Bug] running just yarn doesn't install #738

Haroenv opened this issue Jan 24, 2020 · 20 comments
Labels
bug Something isn't working unreproducible This issue cannot be reproduced on master upholded Real issues without formal reproduction

Comments

@Haroenv
Copy link
Member

Haroenv commented Jan 24, 2020

  • I'd be willing to implement a fix

Describe the bug

Running yarn in v2 gives this error:

yarn
Usage Error: Couldn't find a script named "".

$ yarn run <scriptName> ...

Since we can't run a script named empty string, the previous default of installing makes more sense

To Reproduce

Running just yarn gives this error, regardless of environment.

await packageJsonAndInstall({});
await expect(yarn()).resolves.toBeTruthy();

Environment if relevant (please complete the following information):

  • Yarn version: 2.0.0-rc.26

Additional context

in v1 this installed

@Haroenv Haroenv added the bug Something isn't working label Jan 24, 2020
@arcanis
Copy link
Member

arcanis commented Jan 24, 2020

That's weird, I can't reproduce it 🤔

@Haroenv
Copy link
Member Author

Haroenv commented Jan 24, 2020

I can still reproduce this in the berry repository, what more info could help you?

@yarnbot yarnbot added the broken-repro The reproduction in this issue is broken label Jan 24, 2020
@yarnbot

This comment has been minimized.

@arcanis
Copy link
Member

arcanis commented Jan 24, 2020

Do you have an alias on yarn, by any chance? Maybe try to add a console.log(process.argv) in yarnpkg-cli/sources/boot-cli-dev.js to see what it truly contains 🤔

@yarnbot yarnbot added reproducible This issue can be successfully reproduced and removed broken-repro The reproduction in this issue is broken labels Jan 24, 2020
@yarnbot

This comment has been minimized.

1 similar comment
@yarnbot

This comment has been minimized.

@Haroenv
Copy link
Member Author

Haroenv commented Jan 24, 2020

Hmm, that is a good call:

process.argv === [
  '/Users/haroen/.nvm/versions/node/v13.3.0/bin/node',
  '/Users/haroen/git/berry/scripts/run-yarn.js',
  ''
]

@yarnbot yarnbot added unreproducible This issue cannot be reproduced on master and removed reproducible This issue can be successfully reproduced labels Jan 24, 2020
@yarnbot

This comment has been minimized.

@arcanis
Copy link
Member

arcanis commented Jan 24, 2020

Interesting - any idea where that might come from? Is it nvm? 🤔

@Haroenv
Copy link
Member Author

Haroenv commented Jan 24, 2020

Yes, I am using nvm on fish, let me see how it's configured

@yarnbot
Copy link
Collaborator

yarnbot commented Jan 24, 2020

We couldn't reproduce your issue (all the assertions passed on master).

@arcanis
Copy link
Member

arcanis commented Jan 24, 2020

(sorry for the spammy yarnbot - it triggers when the tags change, even if it changes them itself 🤦‍♀️)

@Haroenv
Copy link
Member Author

Haroenv commented Jan 24, 2020

Looks like this one is the one I'm using https://github.com/FabioAntunes/fish-nvm

@Haroenv
Copy link
Member Author

Haroenv commented Jan 24, 2020

(installed with https://github.com/jorgebucaran/fisher)

@arcanis
Copy link
Member

arcanis commented Jan 24, 2020

Have you found the cause? Should we close the issue?

@Haroenv
Copy link
Member Author

Haroenv commented Jan 27, 2020

I have not found the issue for this, but I guess it can be closed for now

@jrr
Copy link

jrr commented Feb 26, 2021

This is happening to me, too, using Yarn 2.4.0 with Fish:

jrr@jrrmbp ~/dir (experiment/yarn-2)> node --version
v14.15.3
jrr@jrrmbp ~/dir (experiment/yarn-2)> which node
/Users/jrr/.nvm/versions/node/v14.15.3/bin/node
jrr@jrrmbp ~/dir (experiment/yarn-2)> yarn --version
2.4.0
jrr@jrrmbp ~/dir (experiment/yarn-2)> which yarn
/usr/local/bin/yarn
jrr@jrrmbp ~/dir (experiment/yarn-2)> yarn
Usage Error: Couldn't find a script named "".

$ yarn run [--inspect] [--inspect-brk] <scriptName> ...
jrr@jrrmbp ~/dir (experiment/yarn-2) [1]>

@arcanis can you reopen? I'd be willing to try to fix it, if you can help me figure out where to look next.

@ghost
Copy link

ghost commented Mar 10, 2021

Same here, on yarn 2.4.1:

bash-3.2$ yarn check-eslint
[
  '/usr/local/bin/node',
  '/project/node_modules/eslint/bin/eslint.js',
  ''
]

on yarn 1.22.10:

bash-3.2$ yarn check-eslint
[
  '/usr/local/bin/node',
  '/project/node_modules/.bin/eslint'
]

@merceyz merceyz reopened this Mar 10, 2021
@merceyz merceyz added the upholded Real issues without formal reproduction label Mar 10, 2021
@merceyz
Copy link
Member

merceyz commented Mar 10, 2021

Can reproduce by running yarn "" (which translates to yarn<space>)

@jrr
Copy link

jrr commented Mar 18, 2021

I think this may be fixed in fish 3.2.1: https://github.com/fish-shell/fish-shell/releases/tag/3.2.1

(I can no longer repro it)

Can someone else try?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unreproducible This issue cannot be reproduced on master upholded Real issues without formal reproduction
Projects
None yet
Development

No branches or pull requests

5 participants