Set up freeCodeCamp locally on Windows 10 with Docker Toolbox
See original GitHub issueI 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).
A file seems to be indicated as missing but it is present:
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:
- Created 4 years ago
- Comments:11 (6 by maintainers)
Top GitHub Comments
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.Can we investigate instead on how to make it more agnostic of the expected location?
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.