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

[INSTALL] pre-commit hook for prettier #5482

Open
Burhan-Q opened this issue Feb 9, 2025 · 0 comments
Open

[INSTALL] pre-commit hook for prettier #5482

Burhan-Q opened this issue Feb 9, 2025 · 0 comments
Labels
bug Bug fixes installation Installation issues

Comments

@Burhan-Q
Copy link
Contributor

Burhan-Q commented Feb 9, 2025

Instructions

Thank you for submitting an issue. Please refer to our issue policy for information on what types of issues we address.

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
  • Python version (python --version): Python 3.11.6
  • FiftyOne version (fiftyone --version): 1.4.0 (develop branch)
  • FiftyOne installed from (pip or source): source

Commands to reproduce

As thoroughly as possible, please provide the Python and/or shell commands used to encounter the issue.

./install.bat -d

Describe the problem

Provide the exact sequence of commands / steps that you executed before running into the problem.

Important

See https://github.com/pre-commit/mirrors-prettier for information regarding pre-commit hook, it is now archived.

  1. Clone repo
  2. Run installer
  3. pre-commit throws error.
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to C:\Users\User\.cache\pre-commit\patch1739137626-80848.
[INFO] Installing environment for https://github.com/pre-commit/mirrors-prettier.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Restored changes from C:\Users\User\.cache\pre-commit\patch1739137626-80848.
An unexpected error has occurred: CalledProcessError: command: ('Q:\\ML_dev\\voxel51\\fiftyone\\.venv\\Scripts\\python.exe', '-mnodeenv', '--prebuilt', '--clean-src', '\\\\?\\C:\\Users\\User\\.cache\\pre-commit\\repox9j14zry\\node_env-system', '-n', 'system')
return code: 1
expected return code: 0
stdout: (none)
stderr:
    Installing system node.js on win32 is not supported!

Check the log at C:\Users\User\.cache\pre-commit\pre-commit.log
  1. Verify npm and yarn are installed
npm --version
>>> 10.2.4
yarn --version
>>> 1.22.22

Other info/logs

Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

Installed prettier manually following docs https://prettier.io/docs/install and was able to run check files with npx prettier . --check

npx prettier --version
>>> 3.5.0
npx prettier . --check
... # truncated for brevity
>>> [warn] Code style issues found in 5249 files. Run Prettier with --write to fix.
@Burhan-Q Burhan-Q added bug Bug fixes installation Installation issues labels Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fixes installation Installation issues
Projects
None yet
Development

No branches or pull requests

1 participant