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.

After cloning freecodecamp repo, npm run only-once didn’t work

See original GitHub issue

I wanted to clone the FCC repo in order to fix an issue and create a PR. 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

The problem

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\***\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\***\Coding\freeCodeCamp\freeCodeCamp
> npm run ensure-env


> freecodecamp@0.1.0 ensure-env C:\Users\***\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\***\AppData\Roaming\npm-cache\_logs\2018-06-22T11_57_18_601Z-debug.log

How do I go from here? Is there any way to fix this easily? If not, how do I remove everything to start again?

System info:

  • Operating System: Windows 10
  • Node.js version: v8.11.1
  • npm version: 5.6.0
  • git version: 2.16.2.windows.1
  • MongoDB Community Server version: v3.6.5 (latest, from today)

Screenshots

Screenshot from git bash: image

Screenshot from MongoDB: image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
zolbayarscommented, Aug 29, 2018

Despite having a fix in #17472, this error still persists. I bypassed it by dividing the long npm run prelist-js &&... command into separate steps. Like this:

  1. Run just the npm run prelint-js
  2. Add SEEDING=true into your .env (Don’t forget to remove it before running npm run develop)
  3. Run node seed/index.js
1reaction
borisyordanovcommented, Aug 28, 2018

How did you even run this?

npm run prelint-js && echo '//' && echo 'Seeding Database' && echo '//' && SEEDING=true node seed/index.js && echo '//' && echo 'Seeding Completed' && echo '//'

It still has SEEDING = true in it, so your OS will try to run that as a command, which it obviously isnt’t. Am i missing something here?

Edit: For some reason (i assume it’s due to formatting) the command above won’t run in vanilla cmd or Visual Studio Code’s built-in terminal. It does work in Git Bash, however.

Read more comments on GitHub >

github_iconTop Results From Across the Web

After cloning freecodecamp, npm run only-once doesn't work
I am running Windows 10. When I ran npm run only-once in git bash , I got the following response: $ npm run...
Read more >
Cloning Gitbub repository - JavaScript
I'm struggling to understand how i create a GIT repository locally. Maybe bein a bit dim but I cannot work out what I...
Read more >
Trouble getting set up - Contributors
I've forked and cloned the FreeCodeCamp GitHub repository and have ... However, when I run “npm run only-once”, I get this error message:...
Read more >
Managing Packages with NPM - How to Pass Tests Without ...
And when I post that url (with the app running as far as I'm aware) it doesn't pass the test. Here's the link...
Read more >
How to Use package.json Challenge Help!
I cloned the glitch repo, edited the package.json file and paste the ... I'm not sure why the project didn't work from Glitch...
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