Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 19:13
    RandellDawson commented #23327
  • 19:13
    RandellDawson closed #23327
  • 19:12
    ahmadabdolsaheb commented #36656
  • 19:02
    RandellDawson commented #26484
  • 19:02
    RandellDawson closed #26484
  • 19:02
    RandellDawson unlabeled #26484
  • 19:02
    RandellDawson unlabeled #26484
  • 18:48
    viveksharmaui commented #36680
  • 18:47
    viveksharmaui commented #36680
  • 18:44
    RandellDawson commented #36680
  • 18:44
    RandellDawson commented #36680
  • 18:40
    viveksharmaui commented #36680
  • 18:17
    raisedadead labeled #36656
  • 18:17
    raisedadead labeled #36656
  • 18:17
    raisedadead labeled #36656
  • 18:17
    raisedadead labeled #36656
  • 18:17
    viveksharmaui commented #36680
  • 18:16
    raisedadead commented #36656
  • 18:16
    raisedadead labeled #36646
  • 18:16
    raisedadead labeled #36646
Randell Dawson
@RandellDawson
The only way will know for sure is to have the user nuke their local folder, record a video of the entire installation process and post it here. If they still have to run something from the client folder, then we might learn something and have to adjust the documentation.
coreytan00
@coreytan00
@RandellDawson Would you like me to try? I could try the whole thing again haha see what happens while recording it all in the process.
Oliver Eyton-Williams
@ojeytonwilliams
I'm definitely curious. Go for it!
Tom
@moT01
it's a strange one - that problem showed up for me out of nowhere - everything was working real smooth since the mono-repo - and all of a sudden, I got that error
Christopher McCormack
@cmccormack
@moT01 it would be good if you could replicate the issue, lerna should have handled that
Tom
@moT01
so, when I delete my client/node_modules folder and run install from root - the folder gets added and repopulated.... if I go remove the sharp folder from it and run install from root - it doesn't come back, if I remove other folders, they don't come back either.
so it's like just skipping over installing those things in the client
Oliver Eyton-Williams
@ojeytonwilliams
That's to be expected, I think. Lerna doesn't know the packages are no longer installed.
I assume it only looks for the node_modules folder, not anything deeper.
Tom
@moT01
it's looking slightly deeper - I deleted all the modules and just left the node_modules empty - and it repopulated then
Oliver Eyton-Williams
@ojeytonwilliams
Oh, okay. Maybe it checks if node_modules is empty then. Not sure.
Tom
@moT01
I bet it's looking for the dependencies in the client/package.json file
Christopher McCormack
@cmccormack

Lerna does the following when running bootstrap:

When run, this command will:
npm install all external dependencies of each package.
Symlink together all Lerna packages that are dependencies of each other.
npm run prepublish in all bootstrapped packages (unless --ignore-prepublish is passed).
npm run prepare in all bootstrapped packages.

Tom
@moT01
and one of those must be dependent on sharp
Oliver Eyton-Williams
@ojeytonwilliams
Yep, I was talking nonsense, it just checks the top level dependencies.
Tom
@moT01
do you want to test that and see if you get the same results?
cause none of you guys had that problem
Oliver Eyton-Williams
@ojeytonwilliams
Me? Sure. You mean delete sharp from client?
Tom
@moT01
yes
and see if it shows back up after running install from root
Oliver Eyton-Williams
@ojeytonwilliams
So, yeah, it doesn't. It does if I delete client/node_modulesand then run npm ci
But I don't need to run that from client. Running from root works as expected.
Tom
@moT01
yea, that's what I get as well
Oliver Eyton-Williams
@ojeytonwilliams
Well, that's consistent with what @cmccormack was saying, so I guess we wait for the video!
Tom
@moT01
wonder if there's something we can add to force everything to get installed
Oliver Eyton-Williams
@ojeytonwilliams
npm run clean then npm ci always works for me, that's why I'm curious what's going on here.
Christopher McCormack
@cmccormack
@ojeytonwilliams yeah that should work fine
did it not?
Oliver Eyton-Williams
@ojeytonwilliams
For me? Yeah, it works every time.
Christopher McCormack
@cmccormack
hmm I guess npm run clean treats client slightly differently
    "clean": "npm-run-all clean:gatsby-site clean:packages",
    "clean:root-deps": "shx rm -rf node_modules",
    "clean:packages": "lerna clean -y",
    "clean:gatsby-site": "cd ./client && npm run clean",
Oliver Eyton-Williams
@ojeytonwilliams
That's just taking care of gatsby stuff like removing .cache and public. The modules are still being taken care of by lerna
Christopher McCormack
@cmccormack
ah got it
coreytan00
@coreytan00
I can record in several hours if you guys are still curious, although I'm more curious if I can reproduce the errors..
Christopher McCormack
@cmccormack
npm run clean from root won't clear the root node_modules will it?
Tom
@moT01
npm run clean:packages removes the client/node_modules folder
Christopher McCormack
@cmccormack
that's not root
Tom
@moT01
nope
Christopher McCormack
@cmccormack
hmm I guess clean from root probably isn't needed, as npm ci should take care of that
Oliver Eyton-Williams
@ojeytonwilliams
Exactly that, yeah.
@coreytan00 please do, if you've got the time. It's always useful to know if there are bugs to squash or the docs aren't clear enough.
That does work - but the install is a lot slower than it was
Christopher McCormack
@cmccormack
Try with npm ci instead of install?
Tom
@moT01
that didn't work
coreytan00
@coreytan00
So... after deleting my freeCodeCamp repository and starting over the installation process, I recorded in the hopes of finding an error but everything happened to run smoothly. I should mention that I did not reinstall npm, node, or mongodb. Maybe I should try again with them uninstalled?
Oliver Eyton-Williams
@ojeytonwilliams
I'm not sure that's worth the effort. If you've got the recommended versions of node, npm and mongodb, I think it's enough to know the installation process works.
Thanks for taking the time to verify that.
coreytan00
@coreytan00
Of course. I hope that I'll be able to contribute more in the future. For now, I would like to create a PR on the doc regarding setting up freeCodeCamp locally, just clarifying that everything should be run on root directory (aside from mongodb of course) to avoid any errors that could arise from that. As of now, it is not clear.
Randell Dawson
@RandellDawson

As of now, it is not clear.

@coreytan00 What part of the documentation gives the impression that anything needs to be ran from anything other than the root directory?