Need help to clone and setup the FreeCodeCamp website on my pc for offline usage

Need help to clone and setup the FreeCodeCamp website on my pc for offline usage
0
#1

there’s a detailed guide for this but i’m getting an error while running one of he commands on Git Bash (npm install)
this’s the guide :


and i’m getting the following error :

‘cross-env’ is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freecodecamp/[email protected] ensure-env: cross-env DEBUG=fcc:* node ./tools/scripts/ensure-env.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @freecodecamp/[email protected] ensure-env script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Sofiane\AppData\Roaming\npm-cache_logs\2018-12-25T12_12_53_732Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freecodecamp/[email protected] prebootstrap: npm run ensure-env
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @freecodecamp/[email protected] prebootstrap script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Sofiane\AppData\Roaming\npm-cache_logs\2018-12-25T12_12_53_796Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freecodecamp/[email protected] postinstall: npm run bootstrap
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @freecodecamp/[email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Sofiane\AppData\Roaming\npm-cache_logs\2018-12-25T12_12_53_853Z-debug.log

0 Likes

#2

Following this guide worked for me, it has step 4 and 5 switched, try making the copy of sample.env and renaming it to .env, before running npm install.

0 Likes

#3

i just tried and now getting a different error

0 Likes

#4

It is expecting lerna to be globally available. It should work if you do npm i -g lerna (installing the lerna package globally so that the executable is available on the command line), then run the install again.

This isn’t great (you wouldn’t necessarily want to install it globally) so alternatively, if it is a dependency in package.json, wherever it gets called you could edit the command in the file from lerna bootstrap to ./node_modules/.bin/lerna bootstrap

0 Likes

#5

I created a video that details how to set up the freeCodeCamp development environment on your local machine: https://www.youtube.com/watch?v=HVd0T32BS7I

0 Likes

#6

i’m having one problem after another and it’s driving me crazy.
your video was pretty detailed but i’m still getting stuck with many of the steps .
now for some reason checking mongodb’s version returns this : " bash: mongod: command not found "

0 Likes

#7

When you ran, brew install mongo, what happened?

0 Likes

#9

i’m on windows unfortunately

0 Likes

#10

Gotcha. Have you followed the docs to install MongoDB on Windows? If so, you will not be running mongod start or anything of that nature. That’s only for Mac.

Instead, you should be running it as described here: https://docs.mongodb.com/v3.2/tutorial/install-mongodb-on-windows/#run-mongodb-community-edition

0 Likes

#11

I’m getting the below error whenever i run npm install on Git Bash

0 Likes