Hitting CodeSandBox limit

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!!

Thank you.

Create .gitignore file with this content:


and add it to your projects root.

1 Like

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:

  1. 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?

  1. Edit .gitignore file depending on what files we want to ignore (source). According to that document, I had to add the following line to .gitignore file: node_modules/ But I noticed you had it the other way: /node_modules. Any ideas on why these differ?

  2. Stage changes: git add .gitignore

  3. Commit changes (which includes all the deletes from node-modules folder): git commit -m "Start ignoring node-modules folder"

  4. git push origin master

Was this the correct process?

Thanks again!

Yes, those are the correct steps to commit the changes git repository and to push it to the remote repository. :smiley:

1 Like

According to Git - gitignore Documentation 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:

  • node_modules/ will specifically match node_modules folder.

  • /node_modules will match any folder whose path starts with node_modules (basically everything in that folder).

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).

1 Like