-
Notifications
You must be signed in to change notification settings - Fork 191
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 "path" argument must be of type string. Received type undefined #354
Comments
Is anyone else getting the same error? |
yes i am getting this error |
I was getting this error after the 3.1.0 update. Rolled back to 3.0.0 and everything worked OK. |
I was also getting this error and realized it happened when I either ran A more descriptive error would be helpful, but for now maybe try triple-checking for typos if you're still getting this error? |
I get the error when executing |
I am getting the same error. It´s on index.js:116. const clone = path.join(getCacheDir(), filenamify(repo)); The
I don't have a package.json file in my project. that´s why I think I am getting undefined. This only happens on 3.1.0. 3.0.0 works fine, |
I have the same problem/finding as @brpaz above. My static page is not in a nodejs repo, so there's no package.json or node_modules for Looks like the change to use |
because of tschaub/gh-pages#354
To work around tschaub/gh-pages#354.
Still getting the same issue any idea why?? |
node ./node_modules/gh-pages/bin/gh-pages.js -d build |
reading the release notes for 3.1.0
perhaps this issue can be solved by making a new (temporary) dir and passing it to a |
Still getting this error! Trying to publish without a package.json breaks it. |
Adding I was getting this error with gh-pages 5.0.0, whether running via npm script, npx gh-pages --src "{index.html,built,lib,tabs,impulses}/**/*"
gh-pages --src "{index.html,built,lib,tabs,impulses}"
gh-pages
node ./node_modules/gh-pages/bin/gh-pages.js --src "{index.html,built,lib,tabs,impulses}"
mkdir -p .gh-pages-cache && CACHE_DIR=.gh-pages-cache gh-pages --src "{index.html,built,lib,tabs,impulses}"
mkdir -p .gh-pages-cache && CACHE_DIR=$(realpath .gh-pages-cache) gh-pages --src "{index.html,built,lib,tabs,impulses}" Debugging this with VS Code launch.json... {
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug gh-pages",
"skipFiles": [
"<node_internals>/**"
],
"program": "./node_modules/gh-pages/bin/gh-pages.js",
"outFiles": [
"${workspaceFolder}/**/*.js"
]
}
]
} I found that was failing here:
By the way, this sort of error would be easier to track down if it logged the |
I also had this problem (even with a This is the current behaviour for this (invalid) command: ❯ npx gh-pages dist
The "path" argument must be of type string. Received undefined Is ❯ npx gh-pages dist
No base directory specified. The `--dist` option must be specified. For clarity, the correct command in my case is Let me know if there is interest in a PR, I can add this error message and a scenario in gh-pages.spec.js 👍 |
@tschaub mind giving this issue some attention? It's still affecting people three years on. |
What solved it for us was just running a |
I'm currently getting this error when I try to use gh-pages:
There's a previous issue that's similar to this (#308) and I saw that it was already fixed in the latest versions. I'm currently using [email protected]. My node version is v12.7.0 and my npm version is 6.10.0.
The text was updated successfully, but these errors were encountered: