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

Site build error under Windows #2120

Open
chalin opened this issue Dec 19, 2022 · 12 comments
Open

Site build error under Windows #2120

chalin opened this issue Dec 19, 2022 · 12 comments
Labels
CI/infra CI & infrastructure e1-hours Effort: < 8 hrs p3-low

Comments

@chalin
Copy link
Contributor

chalin commented Dec 19, 2022

Originally posted by @Chinwendu20 in #2094 (comment):

Trying to submit a PR, after cloning the repo and running an npm install, I get this error:
image
I have posted this on the slack group, would be grateful for any help that I get

@chalin
Copy link
Contributor Author

chalin commented Dec 19, 2022

@svrnm added:

https://cloud-native.slack.com/archives/C02UN96HZH6/p1671184942392839 leaving the discussion on the npm install here for reference.

@chalin chalin changed the title Site build error Site build error under Windows Dec 19, 2022
@chalin chalin added CI/infra CI & infrastructure e1-hours Effort: < 8 hrs p3-low labels Dec 19, 2022
@chalin
Copy link
Contributor Author

chalin commented Dec 19, 2022

AFAIK, this is an issue under Windows only. The site builds fine under, e.g., GitPod.

@cartermp
Copy link
Contributor

FWIW I did notice this in gitpod as well several months ago, but I think it had to do with something on their end.

@chalin
Copy link
Contributor Author

chalin commented Dec 19, 2022

Note to self: consider fixing this on the Docsy / docsy-example side first (because the scripts are simpler).

@svrnm
Copy link
Member

svrnm commented Oct 15, 2024

During Outreachy we figured out some improvements for developing on windows, we need to add that to the documentation still, cc @theletterf

@snehaio
Copy link

snehaio commented Jan 2, 2025

Hi @svrnm ,I’d like to contribute to opentelemetry.io, but I’m having trouble setting up the repository locally on Windows. I also tried using WSL, but the issue persists. Could you please assist me with this?
{467029CC-83EB-4D94-842F-E26381126E53}

@svrnm
Copy link
Member

svrnm commented Jan 7, 2025

Hi @svrnm ,I’d like to contribute to opentelemetry.io, but I’m having trouble setting up the repository locally on Windows. I also tried using WSL, but the issue persists. Could you please assist me with this?

linking to @theletterf's recommendation:

https://cloud-native.slack.com/archives/C02UN96HZH6/p1727881787891549?thread_ts=1727805453.507049&cid=C02UN96HZH6

Folks, most script won't work when running npm on Windows. That's because they use Bash.
If you're on Windows, I strongly recommend that you use Ubuntu through WSL2 as explained in this guide: https://documentation.ubuntu.com/wsl/en/latest/guides/install-ubuntu-wsl2/

I am not a windows user myself, so I can not confirm if this helps or not, but please give it a try.

@chalin
Copy link
Contributor Author

chalin commented Jan 22, 2025

Originally posted by @trask in #5980 (comment)

Next time maybe consider locally (and temporarily) replacing npx prettier${PRETTIER_AT_VERS} by npx prettier@latest.

this worked! thanks

@trask - would it help (under a Windows environment) if I put npx prettier${PRETTIER_AT_VERS} in a bash script and called that instead?

@trask
Copy link
Member

trask commented Jan 23, 2025

where does PRETTIER_AT_VERS come from when not on Windows? I only see it referenced in GitHub workflows

@chalin
Copy link
Contributor Author

chalin commented Jan 23, 2025

The variable is only set viA the workflow, as a hack to only get the Prettier package rather than all NPM package dependencies when running the format check workflow.

@trask
Copy link
Member

trask commented Jan 23, 2025

I see, so when you run it on Mac, even when PRETTIER_AT_VERS isn't set, it's replaced (with empty) in the package.json file, while when I run it on Windows it's not getting replaced in the package.json file for some reason, and so I get the error

Invalid tag name "prettier${PRETTIER_AT_VERS}" of package "prettier${PRETTIER_AT_VERS}"

@trask
Copy link
Member

trask commented Jan 23, 2025

I guess I didn't quite follow your proposal above

would it help (under a Windows environment) if I put npx prettier${PRETTIER_AT_VERS} in a bash script and called that instead?

I'm happy to test anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/infra CI & infrastructure e1-hours Effort: < 8 hrs p3-low
Projects
None yet
Development

No branches or pull requests

5 participants