Tell us what’s happening:
I am following this guide and i got stuck because of an error i get when running the command
npm run seed
here is the error:
➜ freeCodeCamp git:(main) npm run seed
> @freecodecamp/freecodecamp@0.0.1 seed /home/robdll/code/opensource/freeCodeCamp
> cross-env DEBUG=fcc:* node ./tools/scripts/seed/seedAuthUser
internal/modules/cjs/loader.js:905
throw err;
^
Error: Cannot find module 'mongodb'
Require stack:
- /home/robdll/code/opensource/freeCodeCamp/tools/scripts/seed/seedAuthUser.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object.<anonymous> (/home/robdll/code/opensource/freeCodeCamp/tools/scripts/seed/seedAuthUser.js:4:35)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/robdll/code/opensource/freeCodeCamp/tools/scripts/seed/seedAuthUser.js'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freecodecamp/freecodecamp@0.0.1 seed: `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 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/robdll/.npm/_logs/2022-08-07T17_45_10_576Z-debug.log
Before that I have properly installed the dependencies via
npm ci
here is the output
➜ freeCodeCamp git:(main) npm ci
> core-js-pure@3.19.2 postinstall /home/robdll/code/opensource/freeCodeCamp/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js:
> https://opencollective.com/core-js
> https://patreon.com/zloirock
> https://paypal.me/zloirock
> bitcoin: bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> docsify@4.12.2 postinstall /home/robdll/code/opensource/freeCodeCamp/node_modules/docsify
> opencollective-postinstall
Thank you for using docsify!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/docsify/donate
> cypress@9.7.0 postinstall /home/robdll/code/opensource/freeCodeCamp/node_modules/cypress
> node index.js --exec install
Note: Skipping binary installation: Environment variable CYPRESS_INSTALL_BINARY = 0.
> @freecodecamp/freecodecamp@0.0.1 prepare /home/robdll/code/opensource/freeCodeCamp
> husky install
husky - Git hooks installed
added 1360 packages in 11.032s
Browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
OS information:
Ubuntu 22