I just tried to import the following project from GitHub into CodeSandBox: https://github.com/SabahatPK/vidly.git
But I guess it is too big b/c I am getting the following error message:
Only a max of 250 modules is allowed in a sandbox. I had been able to import another project (which I thought was of similar size but maybe not…??) successfully.
My question is:
1 - Does anyone know if there is any way to reduce the modules before importing…?? Other than trying to reduce size of project. (This might be a bizarre qn but thought I’d ask).
2 - What do people use as an alternative to CodeSandBox? Important for me: must be able to import from GitHub directly!!
.gitignore file with this content:
and add it to your projects root.
Thanks @jenovs! That worked! My project is now available on CodeSandBox again.
I do have some questions (in bold below) as I had to wing it a little depending on what I found on Google about the steps involved:
Since I already pushed files that I now want to ignore, I have to:
- Stop tracking these folders by using these commands: (Source)
git rm -r --cached node_modules
As far as untracking
build, it is IN the node-modules folder so I think that is taken care of. Is that right?
Edit .gitignore file depending on what files we want to ignore (source). According to that document, I had to add the following line to
node_modules/ But I noticed you had it the other way:
/node_modules. Any ideas on why these differ?
git add .gitignore
Commit changes (which includes all the deletes from node-modules folder):
git commit -m "Start ignoring node-modules folder"
git push origin master
Was this the correct process?
Yes, those are the correct steps to commit the changes git repository and to push it to the remote repository.
According to https://git-scm.com/docs/gitignore#_pattern_format there is no difference:
- If the pattern ends with a slash, it is removed for the purpose of the following description, but it would only find a match with a directory.
- A leading slash matches the beginning of the pathname.
I understand it as:
In both cases the result is same. I use the second format because it’s whats used in create-react-app
.gitignore file (just for the sake of consistency).