Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

DISABLE_ESLINT_PLUGIN: command not found #5134

Closed
swisstackle opened this issue May 21, 2022 · 11 comments
Closed

DISABLE_ESLINT_PLUGIN: command not found #5134

swisstackle opened this issue May 21, 2022 · 11 comments

Comments

@swisstackle
Copy link
Contributor

swisstackle commented May 21, 2022


I figured I would transfer this problem to github issues because I dont believe that thats what the discussions are for.

Issue

I am currently trying to build all packages on my local machine to contribute to truffle:

When yarn/lerna (yarn bootstrap) tries to build the truffle dashboard package, I am getting the error 'DISABLE_ESLINT_PLUGIN' is not recognized as an internal or external command, which is used in the package.json to run react-scripts without eslint.

According to react-scripts, this tag was added with the version 4.0.2, but the package.json in the dashboard package references version ^4.0.0 for react-scripts. This is a little bit confusing to me, because how could you guys build the dashboard package with this tag, if you guys use version ^4.0.0? But then again, the carrot makes sure that the latest version is installed, so the issue might clearly be on my side.

Here is the PR that added the 'DISABLE_ESLINT_PLUGIN' tag to react-scripts: facebook/create-react-app#10170

Steps to Reproduce

  1. Clone the develop branch
  2. run yarn bootstrap

Expected Behavior

All packages are being built

Actual Results

Error: ['DISABLE_ESLINT_PLUGIN' is not recognized as an internal or external command]

Environment

  • Operating System: Windows 10 (x64)
  • Truffle version (truffle version): latest develop status
  • node version (node --version): 16.14
  • npm version (npm --version): 8.10.0
@cds-amal
Copy link
Member

cds-amal commented May 21, 2022

@swisstackle
Copy link
Contributor Author

swisstackle commented May 22, 2022

@cds-amal I just installed craco globally (6.4.3), but I am still getting the same error. Technically that shouldnt make a difference anyways, because without having it installed globally, it should just use the craco that is being installed by yarn in the dashboard package.
Ill investigate further.

@cds-amal
Copy link
Member

Thanks, @swisstackle. Please let me know what you discover.

@swisstackle
Copy link
Contributor Author

swisstackle commented May 26, 2022

@cds-amal I think that a lot of issues stem from me using windows.
To make the dashboard-build work, I created an .env file with the following content:

SKIP_PREFLIGHT_CHECK=true
DISABLE_ESLINT_PLUGIN=true

and deleted the corresponding "SKIP_PREFLIGHT_CHECK=true" and "DISABLE_ESLINT_PLUGIN=true" from the package.json.

I obviously won't commit those but I will keep it locally for development purposes.

Other issues I've encountered were the precommit stuff (husky) that I just commented out for now (no nvm for windows). But I will have to find a different solution for that as it is important for the checks (I assume) when I create pull requests.

@benjamincburns
Copy link
Contributor

benjamincburns commented Jun 1, 2022

I think we should make the build work on Windows. We want people to be able to contribute code regardless of what OS they use.

@swisstackle do you happen to have a WSL install? If so, would you mind testing whether or not your changes build correctly under WSL in addition to Windows? If they do, I'd be really happy if you'd be willing to submit those changes as a PR to unbreak the build for Windows users.

@swisstackle
Copy link
Contributor Author

swisstackle commented Jun 1, 2022

I've just reproduced the same error on a different (almost new) windows system. So yes, most likely Windows is the problem.
Specifically two things:

Husky functionality and the disable_entlint thing.

Everything else worked when building.

Yes, WSL is installed.

Here's one problem with committing the changes:

  • I just commented the pre-commit file from husky out. Meaning that if I commit that, the precommit script won't be executed. That's obviously not the solution we want. I can try work on a solution that is compromisable.

Also it should be mentioned to either use Git Bash or WSL for the build (Bash scripts). Ill add that in the contribute.md file.

@benjamincburns
Copy link
Contributor

Yeah, you're correct about the husky pre-commit hooks, but otherwise we'd be super happy for anything that you'd be willing to contribute that would otherwise improve the state of things on Windows.

That said there is an internal effort happening to bring about a Windows CI build, so that will probably improve things pretty dramatically when that drops.

@swisstackle
Copy link
Contributor Author

@benjamincburns I can make a PR for the .env file if you wish. It resolved the Dashboard issue I've had.

@benjamincburns
Copy link
Contributor

That'd be awesome - thanks!

@cliffoo
Copy link
Contributor

cliffoo commented Jun 23, 2022

cross-env made it to Dashboard in develop and now the latest release. Thanks @swisstackle!

@cliffoo cliffoo closed this as completed Jun 23, 2022
@amygoru
Copy link

amygoru commented Jan 16, 2023

Hello all
still show[help me]
PS C:\Users\Amitk\OneDrive\Desktop\data\toonb\love-toon-app> npm start

/user@1.10.0 start
DISABLE_ESLINT_PLUGIN=true react-app-rewired start

'DISABLE_ESLINT_PLUGIN' is not recognized as an internal or external command,
operable program or batch ### file.****

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants