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

Cannot install themes built with this on Windows 10 #9

Closed
choldgraf opened this issue Dec 29, 2021 · 5 comments
Closed

Cannot install themes built with this on Windows 10 #9

choldgraf opened this issue Dec 29, 2021 · 5 comments

Comments

@choldgraf
Copy link
Contributor

choldgraf commented Dec 29, 2021

Description

On windows, it doesn't seem possible to install themes that have been built with STB.

The installation step installs a new nodejs, but then there is a version mismatch between the present and expected versions.

Here's the error message that is given:

   command: 'C:\hostedtoolcache\windows\Python\3.9.9\x64\python.exe' 'C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_editable 'C:\Users\RUNNER~1\AppData\Local\Temp\tmpupz5wwwn'
       cwd: D:\a\pydata-sphinx-theme\pydata-sphinx-theme
  Complete output (17 lines):
  [stb] # nodeenv does not exist.
  [stb] # Generating new nodeenv with NodeJS 14.18.1!
  [stb] # The system `node` has a different version: {}
  [stb] $ python -m nodeenv --node=14.18.1
  D:\a\pydata-sphinx-theme\pydata-sphinx-theme\.nodeenv
   * Install prebuilt node (14.18.1) ..... done.
  symbolic link created for D:\a\pydata-sphinx-theme\pydata-sphinx-theme\.nodeenv\Scripts\nodejs.exe <<===>> node.exe
  [stb] (nodeenv) $ node --version
  v16.13.1
  error: nodeenv-version-mismatch
  x The `nodeenv` for this project is unhealthy.
  
  There is a mismatch between what is present in the environment (v16.13.1) and the expected version of NodeJS (v14.18.1).
  
  hint: Deleting the .nodeenv directory and trying again may work.
  
  Link: sphinx-theme-builder.rtfd.io/errors/#nodeenv-version-mismatch

Replication

I opened a PR in the PyData Sphinx Theme to replicate this.

Here's a GitHub Action job that fails with this error upon installing a theme that has been built with the STB: https://github.com/pydata/pydata-sphinx-theme/runs/4655097854?check_suite_focus=true#step:4:224

Here are the action steps needed to produce this error (with the pydata sphinx theme):

https://github.com/pydata/pydata-sphinx-theme/blob/85d7b5bc00cec96efd794bcc6893779cc7584c2b/.github/workflows/tests.yml#L34-L46

Assume that runs-on is windows-latest

@choldgraf
Copy link
Contributor Author

Just another data point: I wanted to see if this was somehow unique to the pydata theme, but I also was not able to get Furo building locally either. I did the following things and got the error message pasted at the end of this comment:

  • On Windows, in a fresh Python environment
  • Open up powershell as admin user
  • git clone https://github.com/pradyunsg/furo and cd furo
  • pip install .

This resulted in the following error (slightly different from the pydata one, but also seems related to installing node properly)

Building wheels for collected packages: furo
  Building wheel for furo (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\chold\conda\python.exe' 'C:\Users\chold\conda\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\chold\AppData\Local\Temp\tmpp0s6g69l'
       cwd: C:\Users\chold\AppData\Local\Temp\pip-req-build-nsdfnb0l
  Complete output (16 lines):
  [stb] # nodeenv does not exist.
  [stb] # Generating new nodeenv with NodeJS 16.13.0!
  [stb] # Could not find a `node` executable.
  [stb] $ python -m nodeenv --node=16.13.0
  C:\Users\chold\AppData\Local\Temp\pip-req-build-nsdfnb0l\.nodeenv
   * Install prebuilt node (16.13.0) ..... done.
  symbolic link created for C:\Users\chold\AppData\Local\Temp\pip-req-build-nsdfnb0l\.nodeenv\Scripts\nodejs.exe <<===>> node.exe
  [stb] (nodeenv) $ node --version
  error: nodeenv-unhealthy-file-not-found
  x The `nodeenv` for this project is unhealthy.

  None

  hint: Deleting the .nodeenv directory and trying again may work.

  Link: https://sphinx-theme-builder.rtfd.io/errors/#nodeenv-unhealthy-file-not-found
  ----------------------------------------
  ERROR: Failed building wheel for furo

@pradyunsg pradyunsg added the bug label Jan 4, 2022
@pradyunsg
Copy link
Owner

85be6e9

🤦🏽‍♂️

@pradyunsg
Copy link
Owner

@pradyunsg
Copy link
Owner

Released in 0.2.0a13!

@choldgraf
Copy link
Contributor Author

lol :-)

thanks for the fix, it now works! pydata/pydata-sphinx-theme#533

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

No branches or pull requests

2 participants