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.

Can not run FCC via docker

See original GitHub issue

Describe the bug

> @freecodecamp/freecodecamp@0.0.1 bootstrap /app
> lerna bootstrap --ci

lerna notice cli v3.16.4
lerna info versioning independent
lerna info ci enabled
lerna info Bootstrapping 10 packages
lerna info Installing external dependencies
lerna ERR! 
(node:46) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, open '/app/lerna-debug.log.502291454'
    at Object.openSync (fs.js:440:3)
    at Function.writeFileSync [as sync] (/app/node_modules/write-file-atomic/index.js:212:13)
    at writeLogFile (/app/node_modules/@lerna/write-log-file/write-log-file.js:30:19)
    at /app/node_modules/@lerna/command/index.js:72:13
(node:46) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:46) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
added 1349 packages in 13.868s

> @freecodecamp/freecodecamp@0.0.1 docker:seed /disk480/www/external/freeCodeCamp/freeCodeCamp
> docker-compose run --rm freecodecamp npm run seed

Starting freecodecamp_mailhog_1 ... done
Starting freecodecamp_db_1      ... done

> @freecodecamp/freecodecamp@0.0.1 seed /app
> npm-run-all -p seed:*


> @freecodecamp/freecodecamp@0.0.1 seed:challenges /app
> cross-env DEBUG=fcc:* node ./tools/scripts/seed/seedChallenges


> @freecodecamp/freecodecamp@0.0.1 seed:auth-user /app
> cross-env DEBUG=fcc:* node ./tools/scripts/seed/seedAuthUser

internal/modules/cjs/loader.js:800
    throw err;
    ^

Error: Cannot find module 'mongodb'
Require stack:
- /app/tools/scripts/seed/seedChallenges.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
    at Function.Module._load (internal/modules/cjs/loader.js:690:27)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/app/tools/scripts/seed/seedChallenges.js:4:35)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/tools/scripts/seed/seedChallenges.js' ]
}
internal/modules/cjs/loader.js:800
    throw err;
    ^

Error: Cannot find module 'mongodb'
Require stack:
- /app/tools/scripts/seed/seedAuthUser.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
    at Function.Module._load (internal/modules/cjs/loader.js:690:27)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/app/tools/scripts/seed/seedAuthUser.js:3:21)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/tools/scripts/seed/seedAuthUser.js' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freecodecamp/freecodecamp@0.0.1 seed:challenges: `cross-env DEBUG=fcc:* node ./tools/scripts/seed/seedChallenges`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @freecodecamp/freecodecamp@0.0.1 seed:challenges script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freecodecamp/freecodecamp@0.0.1 seed:auth-user: `cross-env DEBUG=fcc:* node ./tools/scripts/seed/seedAuthUser`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @freecodecamp/freecodecamp@0.0.1 seed:auth-user 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!     /home/node/.npm/_logs/2019-12-22T01_54_42_990Z-debug.log

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/node/.npm/_logs/2019-12-22T01_54_42_994Z-debug.log
ERROR: "seed:challenges" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freecodecamp/freecodecamp@0.0.1 seed: `npm-run-all -p seed:*`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @freecodecamp/freecodecamp@0.0.1 seed 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!     /home/node/.npm/_logs/2019-12-22T01_54_43_023Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freecodecamp/freecodecamp@0.0.1 docker:seed: `docker-compose run --rm freecodecamp npm run seed`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @freecodecamp/freecodecamp@0.0.1 docker:seed 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!     /home/fi1osof/.npm/_logs/2019-12-22T01_54_43_436Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freecodecamp/freecodecamp@0.0.1 docker:run-once: `npm run docker:init && npm run docker:install && npm run docker:seed`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @freecodecamp/freecodecamp@0.0.1 docker:run-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!     /home/fi1osof/.npm/_logs/2019-12-22T01_54_43_451Z-debug.log

To Reproduce Steps to reproduce the behavior: Instruction: https://github.com/freeCodeCamp/freeCodeCamp/blob/master/docs/how-to-setup-freecodecamp-locally.md

  1. Fork to own repository
  2. Clone from own repository
  3. Run npm run docker:run-once

Desktop (please complete the following information): Distributor ID: Ubuntu Description: Ubuntu 19.10 Release: 19.10 Codename: eoan node v10.17.0 npm v6.11.3 Docker version 19.03.2, build 6a30dfca03 docker-compose version 1.25.0, build 0a186604

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:24 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
ojeytonwilliamscommented, Jan 7, 2020

Sorry, I was a bit premature closing this. I assumed that /disk480/www/external/freeCodeCamp/freeCodeCamp was an external drive, because, well, it has external in it!

Anyway, I’m re-opening this for now, in case anyone has some insight on this. However, I still think you’re more likely to reach people that can help you on Gitter or the forums.

1reaction
ojeytonwilliamscommented, Feb 11, 2020

is the any way i can bypass husky install ?

That would be fixing a symptom of the problem. I think that the root cause is the lack of permissions, and if you solve that husky should work fine. I recommend searching for docker permissions problem and seeing if any of the fixes apply to you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot get FCC working on Docker - Contributors
It looks like the installation did not go through correctly. Looking at the logs, I think you should attempt installing the dependencies again....
Read more >
Image Layer Details - icharalampidis/projects:fcc-1
icharalampidis/projects:fcc-1 ... /bin/sh -c mkdir -p /run/systemd ... COPY dir:1b8a244c25d057fa780076dc9e0f3fe0ff50bb9b9caeb60836cf6981d6169e51 in /srv/src.
Read more >
How to Create an Ignition Configuration File
Introduction. This guide shows how to create an Ignition configuration to deploy a Fedora CoreOS (FCOS) cloud server instance at Vultr.
Read more >
UISP 1.4.4
In case any of those versions is not sufficient the UISP upgrade via GUI will fail and give you a message about upgrading...
Read more >
OFS Crime and Compliance Studio Kubernetes Installation Guide
It is not developed or intended for use in any inherently dangerous applications, ... Docker. 1.2. Access to Oracle Support. OFS FCC Studio...
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