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 run addons-frontend on Windows 10 #13297

Closed
M4trox opened this issue Jul 6, 2019 · 5 comments
Closed

Cannot run addons-frontend on Windows 10 #13297

M4trox opened this issue Jul 6, 2019 · 5 comments
Labels
repository:addons-frontend Issue relating to addons-frontend

Comments

@M4trox
Copy link

M4trox commented Jul 6, 2019

Describe the problem and steps to reproduce it:

I'm trying to run addons-frontend on Windows 10.
How to reproduce:

  • install packages by typing yarn into terminal
  • run yarn amo:dev

What happened?

Command yarn amo:dev failed with an error:

to be executed: "npm run clean && concurrently 'npm run webpack-dev-server' 'node bin/server.js | pino-devtools --mode buffer --tee | pino-pretty' 'node bin/proxy.js |
pino-pretty'"

> mozilla-addons-frontend@0.0.1 clean E:\webdev\addons-frontend
> rimraf './dist/*!(.gitkeep)' './webpack-assets.json' './src/locale/**(!.gitkeep)'

'pino-pretty'' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 255.

What did you expect to happen?

addons-frontend will run without errors

Anything else we should know?

I'm running Windows 10 with node installed through nvm, version v12.6.0.

@willdurand
Copy link
Member

I'll try to fix that, thanks for reporting this issue

@willdurand
Copy link
Member

Do you use WSL by chance? https://docs.microsoft.com/en-us/windows/wsl/install-win10

@willdurand
Copy link
Member

@M4trox so I just tried and installed WSL with ubuntu 18.04. I think this is the way to go nowadays.

You need Node 10.x, which can be installed using a ppa. You need yarn, which can be installed via apt after having configured the apt repository (documented in the Yarn docs). You also need make (sudo apt install make). After that, everything should just work.

@M4trox
Copy link
Author

M4trox commented Jul 8, 2019

@willdurand thank you for taking your time.
I tried yesterday to run the project and just as you, I've installed Windows Subsystem for Linux and Ubuntu (from Microsoft Store). Apart from installing node through nvm, I also needed to install better-npm-run, because I was getting an error:
'better-npm-run' is not recognized as an internal or external command, operable program or batch file.

I do believe that better-npm-run should be placed in devDependencies. What do you think?

Then, there was a Python-related error: gyp ERR! stack Error: Can't find Python executable. I needed to install Python manually by running sudo apt-get install python3.6.

While trying to run the project locally, I also experienced some error related to full-icu, but I cannot remember how I fixed it. I think I just installed it normally by running yarn add full-icu.

And, finally, it started to work! :)

I started doing changes in React components. Then, I wanted to run tests. Typed yarn test, hit enter and, guess what - new problems arrived, this time with Flow :(

Please wait. Server is starting up
Lost connection to the flow server (3 retries remaining)
Launching Flow server for /mnt/e/webdev/addons-frontend
Spawned flow server (pid=1038)
Logs will go to /mnt/e/webdev/addons-frontend/flow/logs/flow.log
Monitor logs will go to /tmp/flow/zSmntzSezSwebdevzSaddons-frontend.monitor_log
Started a new flow server: -The flow server is not responding (3 retries remaining): \The flow server is not responding (2 retries remaining): |The flow server is not responding (1 retry remaining): /The flow server is not responding (0 retries remaining): -
Out of retries, exiting!

I tried to manually kill flow instances (npx flow stop) but it did nothing.

Edit: I've read README.md and there is a command for running tests without Flow: NO_FLOW=1 yarn test. It works, but it won't make sense to run tests without Flow in the long run. There's an issue in Flow repository - facebook/flow#1428 - and many people on Windows experience this issue.

@willdurand
Copy link
Member

Apart from installing node through nvm, I also needed to install better-npm-run, because I was getting an error:
'better-npm-run' is not recognized as an internal or external command, operable program or batch file.

I do believe that better-npm-run should be placed in devDependencies. What do you think?

It should be in the dependencies already. 🤔

Then, there was a Python-related error: gyp ERR! stack Error: Can't find Python executable. I needed to install Python manually by running sudo apt-get install python3.6.

ahm, maybe my Windows 10 had a working python setup already (although it should not be shared with the WSL). Weird. Did you use Ubuntu 18.04? I did not install from the Store but I saw the Store has different Ubuntu versions. I used this Ubuntu: https://aka.ms/wsl-ubuntu-1804

I started doing changes in React components. Then, I wanted to run tests. Typed yarn test, hit enter and, guess what - new problems arrived, this time with Flow :(

Yeah, Flow isn't always super nice... It happened to me on MacOS too. While it'd be nice to have Flow, I think you can do a lot of things without. There is nothing we can do, though 😞

Great to hear that it works!

@KevinMind KevinMind transferred this issue from mozilla/addons-frontend May 5, 2024
@KevinMind KevinMind added repository:addons-frontend Issue relating to addons-frontend migration:2024 labels May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repository:addons-frontend Issue relating to addons-frontend
Projects
None yet
Development

No branches or pull requests

3 participants