It doesn’t let me import from githuband now i have to project on glitch, because it doesnt let me import from github
Hey @ramoth123 are you seeing some sort of error when you try to import? Can you provide the name of the repo you’re trying to import and perhaps the project name so we can take a look?
this, it doesnt work, no matter what i do. I tried everything. WhY iSnT iT iMpoRtInG fRoM gIThUb.
Git repo is privat
With the project or repo name I can see if our logs give us any hints as to what’s going wrong. In some cases the structure of the project and repo can also affect the import process itself.
If you care to invite me to your repo (I’m @cori on GitHub as well) I can also try to test it myself to see if I can sort out what’s going on.
Thanks for the info - i removed the invite token from the link so the internet doesn’t get a hold of it. For future reference, Glitch-folk who help out here don’t need to be invited to your project; the project name is sufficient.
In this case the problem is that your repo has a
node_modules directory. In my experience that in itself is a little unusual - it’s more typical for the repo to have the package.json file that instructs the system that’s cloning or importing the repo how to build its own
node_modules directory. In Glitch’s case specifically, your project’s
node_modules directory points to a shared volume where we store modules, and the backend script that handles the import is erroring out because it can’t overwrite that
If you were to replace your repo’s
node_modules directory with a package.json file, your import should be happier and that will give Glitch what it needs to build its own copy. I’d suggest giving that a try before you remove me from your repo in case we get past that error and just end up with a different one.
Hope this helps!
@cori I added a package.json file but it still doesn’t work, do i have to remove the node_mosules folder too?
Yep! That folder is what’s actually causing the problem; the package.json file just means that Glitch will be able to recreate its own version of that folder.
nope, still erroring out
Ok, now you’re running into a similar but slightly different problem. some of your directories have files in the that are also in our global gitignore file at /etc/gitignore-global, and in this case the import script can’t properly clean up those files before trying to copy the files from GitHub into place. Probably the most straightforward way to work around this it to issue
rm -rf /app/*
from your project’s console. That will get rid of everything in the /app directory. Once that’s done, please to try the import again; it should go more smoothly.
I’m sorry for the bother and the frustration. I’m curious where you ran that command. That looks like an error message from a PowerShell session, so I’m guessing you ran it on your local copy of your project, in which case i apologize for the confusion - I intended you to run that command in the Glitch project’s console.
i did run it in glitch too, but nothing happend. EDIT: Oh it imported