gh-pages: The "file" argument must be of type string. Received type undefined
I have a directory dist/, when I run gh-pages --dist dist from my package.json, I get this error:
The "file" argument must be of type string. Received type undefined
node: v12.7.0
Ubuntu (Pop!_OS 19.04)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 19
- Comments: 22 (1 by maintainers)
Commits related to this issue
- Work around bug in gh-pages 2.1.0 https://github.com/tschaub/gh-pages/issues/308 — committed to artichoke/ferrocarril by lopopolo 5 years ago
- Work around bug in gh-pages 2.1.0 https://github.com/tschaub/gh-pages/issues/308 — committed to artichoke/cactusref by lopopolo 5 years ago
- Work around bug in gh-pages 2.1.0 https://github.com/tschaub/gh-pages/issues/308 — committed to artichoke/artichoke by lopopolo 5 years ago
- Downgrade version of gh-pages because of https://github.com/tschaub/gh-pages/issues/308 — committed to klekowskim/wroclawjug-random-attendee-v2 by klekowskim 5 years ago
- build: revert to gh-pages@2.0.1 https://github.com/tschaub/gh-pages/issues/308 — committed to zillow/drywall by deleted user 5 years ago
- Work around gh-pages issue for deploys Works around: - https://github.com/tschaub/gh-pages/issues/310 - https://github.com/tschaub/gh-pages/issues/308 — committed to ahuth/frostbite by ahuth 5 years ago
- Fix gh-pages deploy npm-script Because of https://github.com/tschaub/gh-pages/issues/308 — committed to koki-sato/koki-sato.github.io by koki-sato 5 years ago
- Fix gh-pages deploy npm-script Because of https://github.com/tschaub/gh-pages/issues/308 — committed to koki-sato/koki-sato.github.io by koki-sato 5 years ago
- Downgrade gh-pages to 2.0.1 https://github.com/tschaub/gh-pages/issues/308 — committed to catinclay/BuuTennis by lrills 5 years ago
- Fix gh-pages deploy npm-script Because of https://github.com/tschaub/gh-pages/issues/308 — committed to koki-sato/koki-sato.github.io by koki-sato 5 years ago
- Fix gh-pages deploy npm-script Because of https://github.com/tschaub/gh-pages/issues/308 — committed to koki-sato/koki-sato.github.io by koki-sato 5 years ago
Adding
--git "$(which git)"to the args I passgh-pagesworks around this issue.@AffiliateThis Guessing you tried it already, but if you haven’t: -Delete node_modules -Delete package-lock file -In package.json -> dependencies -> delete gh-pages line
run npm i gh-pages@2.0.1 run npm i try again.
@BjornoWalker also, if you don’t want to hardcode the git path, you can use
--git gitas git is inPATHby default on most systems including Windows, OR you can downgrade togh-pages@2.0.1The gh-pages@2.1.1 release includes a fix for this.
Downgrading to 2.0.1 works.
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.