After cloning freecodecamp repo, npm run only-once didn’t work
See original GitHub issueI 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:
Screenshot from MongoDB:
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:17 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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:npm run prelint-js
SEEDING=true
into your.env
(Don’t forget to remove it before runningnpm run develop
)node seed/index.js
How did you even run this?
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.