-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The "file" argument must be of type string. Received type undefined #308
Comments
I'm also receiving this error.
|
Even I'm facing this error.
|
I am trying to deploy a fresh create-react-app to GitHub pages and I am getting this error now too.
|
I think this might be an issue of one of gh-pages's dependencies. I did a mass search in the codebase for the word "file" and don't see anything that would be emitting that that error. I also erased my yarn.lock file and regenerated it around 2 hours ago which is causing me to believe it's related to a subdependency |
I got this error too. |
Another hint, when I run:
I see this:
But when I try opening up the node_modules folder nothing was cloned, maybe git related? |
The newly introduced |
Adding |
Thanks for the help, I am having the same issue. Where are you supposed to add --git "$(which git)" exactly? |
@BjornoWalker I had problem with @lopopolo 's use of quotes, I used a command like this directly in the command line However this wasn't working when I stored it as a command in my package.json |
@the-simian Thank you for the response. I'm not sure if it's something that i'm doing on my end, but it still won't work for me even without the quotations. I'm still getting the same |
@BjornoWalker try just simply typing I think my problem is related to windows spawning child process from an npm script, unfortunately. I can write a script like `get-git : "(which git)" and we're good. I put which git in another script in any way -nope. There's probably some trick to this I'm overlooking |
Thanks a lot, I was finally able to get it to work thanks to your advice! I'm going to keep looking into creating the reusable npm script also. |
@BjornoWalker also, if you don't want to hardcode the git path, you can use |
Am facing the same issue.
|
Downgrading to 2.0.1 works. |
I spent more time on this today and the only thing that worked for me reliably was actually downgrading. My hope is that the non-inclusion of the git switch defaults to 2.0.1 behavior in a future release, but you can override that if you want |
I tried updating both the package and lock with versions 2.0.1 and 2.1.0 and I am still getting the same error. I am a bit stumped here. This is just a basic react app. Any suggestions...
The "file" argument must be of type string. Received type undefined |
@AffiliateThis run npm i [email protected] |
I actually hadn't tried those steps. I tried a few other things, but thank-you. It actually worked. Something worked....True Happiness in Deployment. |
Thanks..this works. |
The [email protected] release includes a fix for this. |
I have a directory
dist/
, when I rungh-pages --dist dist
from my package.json, I get this error:The "file" argument must be of type string. Received type undefined
The text was updated successfully, but these errors were encountered: