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: (react-native 0.74.1) error when installing the packages #122

Closed
1 task
rodrigodiasf1984 opened this issue May 30, 2024 · 6 comments · Fixed by #123
Closed
1 task

Bug: (react-native 0.74.1) error when installing the packages #122

rodrigodiasf1984 opened this issue May 30, 2024 · 6 comments · Fixed by #123
Labels
accepted bug Something isn't working

Comments

@rodrigodiasf1984
Copy link

Environment

Node version: 20.12.2
npm version: 10.5.2
Local ESLint version: ^9.2.0
Global ESLint version:
Operating System: macOS 14.4.1

What parser are you using?

@typescript-eslint/parser

What did you do?

╰─ npx eslint --init ─╯
You can also run this command directly using 'npm init @eslint/config@latest'.
✔ How would you like to use ESLint? · problems
✔ What type of modules does your project use? · esm
✔ Which framework does your project use? · react
✔ The React plugin doesn't officially support ESLint v9 yet. What would you like to do? · 8.x
✔ Does your project use TypeScript? · typescript
✔ Where does your code run? · No items were selected
The config that you've selected requires the following dependencies:

[email protected], @eslint/js, typescript-eslint, eslint-plugin-react
✔ Would you like to install them now? · No / Yes
✔ Which package manager do you want to use? · yarn
☕️Installing...
Unknown Syntax Error: Unsupported option name ("--force").

$ yarn add [--json] [-E,--exact] [-T,--tilde] [-C,--caret] [-D,--dev] [-P,--peer] [-O,--optional] [--prefer-dev] [-i,--interactive] [--cached] [--mode #0] ...
A config file was generated, but the config file itself may not follow your linting rules.

What did you expect to happen?

install the packges without errors

What actually happened?

i've got this error:
☕️Installing...
Unknown Syntax Error: Unsupported option name ("--force").

Link to Minimal Reproducible Example

https://eslint.org/play/

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

i not sure, but i think the problem is the version of the yarn at the new projects of react-native

by default this is the "packageManager": "[email protected]"

@rodrigodiasf1984 rodrigodiasf1984 added bug Something isn't working repro:needed labels May 30, 2024
@nzakas nzakas transferred this issue from eslint/eslint May 30, 2024
@nzakas
Copy link
Member

nzakas commented May 30, 2024

Thanks for the report. As the issue template states, we don't investigate bug reports without a repro. Please update the description with a StackBlitz reproduction and we will take a look.

@nzakas nzakas moved this from Needs Triage to Triaging in Triage May 30, 2024
@aladdin-add
Copy link
Member

looks like yarn does not support --force. I will test yarn v1/yarn latest/pnpm/bun, and make a fix later.

@aladdin-add aladdin-add moved this from Triaging to Ready to Implement in Triage May 30, 2024
aladdin-add added a commit that referenced this issue May 31, 2024
1. yarn v2+ does not support it.
2. yarn v1 can install without the flag.

fixes #122
@aladdin-add aladdin-add moved this from Ready to Implement to Implementing in Triage May 31, 2024
@aladdin-add
Copy link
Member

@rodrigodiasf1984 I was not able to repro using yarn v1. are you using yarn v2+?

aladdin-add added a commit that referenced this issue May 31, 2024
1. yarn v2+ does not support it.
2. yarn v1 can install without the flag.

fixes #122
aladdin-add added a commit that referenced this issue May 31, 2024
1. yarn v2+ does not support it.
2. yarn v1 can install without the flag.

fixes #122
@rodrigodiasf1984
Copy link
Author

by default this is the "packageManager": "[email protected]"

by default this is the of the new react-native 0.74.1 "packageManager": "[email protected]"

@aladdin-add
Copy link
Member

thanks, it will be fixed by #123

@rodrigodiasf1984
Copy link
Author

here this is a repo in github to reproduce the error: https://github.com/rodrigodiasf1984/rn074Test.git

just clone it, run yarn and npm init @eslint/config@latest

follow the instruction at the terminal
✔ How would you like to use ESLint? · problems
✔ What type of modules does your project use? · esm
✔ Which framework does your project use? · react
✔ The React plugin doesn't officially support ESLint v9 yet. What would you like to do? · 8.x
✔ Does your project use TypeScript? · typescript
✔ Where does your code run? · No items were selected
The config that you've selected requires the following dependencies:

[email protected], @eslint/js, typescript-eslint, eslint-plugin-react
✔ Would you like to install them now? · No / Yes
✔ Which package manager do you want to use? · yarn
☕️Installing...
Unknown Syntax Error: Unsupported option name ("--force").

$ yarn add [--json] [-E,--exact] [-T,--tilde] [-C,--caret] [-D,--dev] [-P,--peer] [-O,--optional] [--prefer-dev] [-i,--interactive] [--cached] [--mode #0] ...

mdjermanovic pushed a commit that referenced this issue Jun 4, 2024
* fix: do not use `--force` when choosing yarn

1. yarn v2+ does not support it.
2. yarn v1 can install without the flag.

fixes #122

* refactor output()
@github-project-automation github-project-automation bot moved this from Implementing to Complete in Triage Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants