freeCodeCamp: Can not run FCC via docker
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
- Fork to own repository
- Clone from own repository
- 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
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 24 (7 by maintainers)
Sorry, I was a bit premature closing this. I assumed that
/disk480/www/external/freeCodeCamp/freeCodeCampwas an external drive, because, well, it hasexternalin 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.
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.