After cloning freecodecamp, npm run only-once doesn't work

I followed the installation steps specified here: https://forum.freecodecamp.org/t/how-to-clone-and-setup-the-free-code-camp-website-on-a-windows-pc/19366
I am running Windows 10.

When I ran npm run only-once in git bash , I got the following response:

$ npm run only-once

> freecodecamp@0.1.0 only-once C:\Users\Udi\Coding\freeCodeCamp\freeCodeCamp
> npm run prelint-js && echo '/****/' && echo 'Seeding Database' && echo '/****/' && SEEDING=true node seed/index.js && echo '/****/' && echo 'Seeding Completed' && echo '/****/'


> freecodecamp@0.1.0 prelint-js C:\Users\Udi\Coding\freeCodeCamp\freeCodeCamp
> npm run ensure-env


> freecodecamp@0.1.0 ensure-env C:\Users\Udi\Coding\freeCodeCamp\freeCodeCamp
> node ./config/ensure-env.js



rev-manifest present




pathMigration present


'/****/'
'Seeding Database'
'/****/'
'SEEDING' 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@0.1.0 only-once: `npm run prelint-js && echo '/****/' && echo 'Seeding Database' && echo '/****/' && SEEDING=true node seed/index.js && echo '/****/' && echo 'Seeding Completed' && echo '/****/'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the freecodecamp@0.1.0 only-once 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\Udi\AppData\Roaming\npm-cache\_logs\2018-06-22T11_57_18_601Z-debug.log

What does this mean? How do I go from here?

I think that the Contributors’ Chat Room is probably the best place to get help on issues like this. Just popping in quickly, I see that someone else just asked about it.

1 Like

Hey, I joined the chatroom and found a solution. Thanks!

If anyone encounters the same problem, the solution was to run the command that is first displayed after running npm run only-once:
npm run prelint-js && echo '/****/' && echo 'Seeding Database' && echo '/****/' && SEEDING=true node seed/index.js && echo '/****/' && echo 'Seeding Completed' && echo '/****/'

The database should be seeded successfully after that (you can see feedback of the seeding process in the terminal window where you ran mongoDB and in the terminal window you ran the command.

I currently have a different issue which is apparently a known bug but that is for a different post.

Lifesaver. Thank you so much.