question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set up freeCodeCamp locally on Windows 10 with Docker Toolbox

See original GitHub issue

I wanted to set up freeCodeCamp locally on Windows 10. I have followed the guide with the Docker build as it is recommended (By the way, the guide is clear and well written). I’ve installed the Docker Toolbox as I have Windows 10 Family (v 1803) and I’ve changed the DOCKER_HOST_LOCATION to the IP adress indicated by docker-machine ip. Then I’ve ran npm run docker:init but it doesn’t work as the screenshot below shows (the two other commands: npm run docker:install and npm run docker:seed do not succeed either). capture1

A file seems to be indicated as missing but it is present:

capture2

Here is the npm log:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\tmp\\.nvm\\v10.12.0\\node.exe',
1 verbose cli   'C:\\tmp\\.nvm\\v10.12.0\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'docker:init' ]
2 info using npm@6.4.1
3 info using node@v10.12.0
4 verbose run-script [ 'predocker:init', 'docker:init', 'postdocker:init' ]
5 info lifecycle @freecodecamp/freecodecamp@0.0.1~predocker:init: @freecodecamp/freecodecamp@0.0.1
6 info lifecycle @freecodecamp/freecodecamp@0.0.1~docker:init: @freecodecamp/freecodecamp@0.0.1
7 verbose lifecycle @freecodecamp/freecodecamp@0.0.1~docker:init: unsafe-perm in lifecycle true
8 verbose lifecycle @freecodecamp/freecodecamp@0.0.1~docker:init: PATH: C:\tmp\.nvm\v10.12.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\desktop\freeCodeCamp\node_modules\.bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\ImageMagick-7.0.7-Q16;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files (x86)\PDFtk Server\bin\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Calibre2\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Yarn\bin\;C:\Users\blanc\Miniconda3;C:\Users\blanc\Miniconda3\Library\mingw-w64\bin;C:\Users\blanc\Miniconda3\Library\usr\bin;C:\Users\blanc\Miniconda3\Library\bin;C:\Users\blanc\Miniconda3\Scripts;C:\Users\blanc\AppData\Local\Microsoft\WindowsApps;C:\ffmpeg-20171231-2906363-win64-static\bin;C:\Users\blanc\AppData\Local\Pandoc;C:\Program Files\Zeal;C:\Program Files\Microsoft VS Code\bin;C:\Users\blanc\AppData\Local\Yarn\bin;C:\Users\blanc\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Sublime Text 3;D:\Desktop\Programmation\ansifilter-2.9-x64;D:\Desktop\go\bin;C:\Program Files\Docker Toolbox;C:\tmp\.nvm\v10.12.0;C:\Users\blanc\AppData\Roaming\npm
9 verbose lifecycle @freecodecamp/freecodecamp@0.0.1~docker:init: CWD: D:\desktop\freeCodeCamp
10 silly lifecycle @freecodecamp/freecodecamp@0.0.1~docker:init: Args: [ '/d /s /c',
10 silly lifecycle   'docker-compose run -u root --rm freecodecamp bash change_volumes_owner.sh && docker-compose run -u root --rm client bash -c "cd .. && bash change_volumes_owner.sh" && docker-compose run -u root --rm api-server bash -c "cd .. && bash change_volumes_owner.sh"' ]
11 info lifecycle @freecodecamp/freecodecamp@0.0.1~docker:init: Failed to exec docker:init script
12 verbose stack Error: @freecodecamp/freecodecamp@0.0.1 docker:init: `docker-compose run -u root --rm freecodecamp bash change_volumes_owner.sh && docker-compose run -u root --rm client bash -c "cd .. && bash change_volumes_owner.sh" && docker-compose run -u root --rm api-server bash -c "cd .. && bash change_volumes_owner.sh"`
12 verbose stack spawn ENOENT
12 verbose stack     at ChildProcess.<anonymous> (C:\tmp\.nvm\v10.12.0\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:48:18)
12 verbose stack     at ChildProcess.emit (events.js:182:13)
12 verbose stack     at maybeClose (internal/child_process.js:962:16)
12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
13 verbose pkgid @freecodecamp/freecodecamp@0.0.1
14 verbose cwd D:\desktop\freeCodeCamp
15 verbose Windows_NT 10.0.17134
16 verbose argv "C:\\tmp\\.nvm\\v10.12.0\\node.exe" "C:\\tmp\\.nvm\\v10.12.0\\node_modules\\npm\\bin\\npm-cli.js" "run" "docker:init"
17 verbose node v10.12.0
18 verbose npm  v6.4.1
19 error file C:\WINDOWS\system32\cmd.exe
20 error code ELIFECYCLE
21 error errno ENOENT
22 error syscall spawn
23 error @freecodecamp/freecodecamp@0.0.1 docker:init: `docker-compose run -u root --rm freecodecamp bash change_volumes_owner.sh && docker-compose run -u root --rm client bash -c "cd .. && bash change_volumes_owner.sh" && docker-compose run -u root --rm api-server bash -c "cd .. && bash change_volumes_owner.sh"`
23 error spawn ENOENT
24 error Failed at the @freecodecamp/freecodecamp@0.0.1 docker:init script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

Someone could help me?

EDIT:

I use the second method with npm and mongodb and it works for me (except I can’t access my portfolio, even when I click on the Preview Custom 404 Page button: but it doesn’t matter to me). Thanks for this huge and useful work!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
raisedadeadcommented, Jun 8, 2019

git fetch upstream git reset --hard upstream/master

I think this is better, considering the no of changes that go into master each day, its not efficient to do a rebase on pull. A hard reset is more dangerous when someone worked on a local copy on master, but I am inclined with that tradeoff vs rebase on pull.

1reaction
raisedadeadcommented, Jun 6, 2019

By default for docker toolbox setup, a freecodecamp folder should be in C:\Users\<user_name>\path\to\freecodecamp

Can we investigate instead on how to make it more agnostic of the expected location?

I use the second method with npm and mongodb and it works for me (except I can’t access my portfolio, even when I click on the Preview Custom 404 Page button: but it doesn’t matter to me).

You should be able to view the profile you signed in with, needs more investigation on why that would be the case.

P.S: We all hangout in Contributors Chat room, feel free to hop in and discuss more.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to run Docker on Windows 10 Home edition
First you need to install a software called Oracle VM VirtualBox. It gives you the ability to have multiple virtual machines installed on...
Read more >
Setting up FCC on Windows - Contributors - The freeCodeCamp ...
# Set up freeCodeCamp locally using Docker Follow these guidelines for getting freeCodeCamp locally on your system. This is highly recommended if you...
Read more >
How to set up Docker and Windows Subsystem for Linux
First of all, you need to install Docker for Windows. There's Docker Enterprise Editions for Windows Server 2016 (and up) and there's Community ......
Read more >
A beginner's guide to Docker — how to create a client/server ...
After a short introduction on Docker-Compose, you will be able to create your first client/server-side application with Docker.
Read more >
The Docker Handbook – Learn Docker for Beginners
How to Install Docker on macOS; How to Install Docker on Windows ... site and follow the instructions for installing WSL2 on Windows...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found