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

Older version of gift refers to an inaccessible property #116

Closed
abloom12 opened this Issue Oct 31, 2017 · 17 comments

Comments

@abloom12

abloom12 commented Oct 31, 2017

Im getting this Error:
TypeError: Cannot read property '0' of null
at Function.module.exports.Commit.actor (/Users/Ash/Documents/Projects/Websites/jherron-portfolio/node_modules/gift/lib/commit.js:145:56)
at Function.module.exports.Commit.parse_commits (/Users/Ash/Documents/Projects/Websites/jherron-portfolio/node_modules/gift/lib/commit.js:111:21)
at /Users/Ash/Documents/Projects/Websites/jherron-portfolio/node_modules/gift/lib/commit.js:55:39
at ChildProcess.exithandler (child_process.js:189:7)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:920:16)
at Socket. (internal/child_process.js:351:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)

I have my "dist" folder in the root of the directory and here is my gulp.js task below.

gulp.task('deploy', () => {
return gulp.src('./dist/**/*')
.pipe($.ghPages());

Im new to gulp so not sure what I'm doing wrong. I've tried removing the ./ from in front of dist in the src().

@PauloLuan

This comment has been minimized.

PauloLuan commented Oct 31, 2017

Same error here. Using Node 8+

This is the repository that isn't working: https://github.com/ParahybaValley/landpage

@abloom12

This comment has been minimized.

abloom12 commented Nov 2, 2017

I deleted my gh-pages branch and then re created it on the website instead of using the command line. I then re-ran my gulp task and everything worked. I have no clue how I fixed the issue but I'm not complaining.

Give that a try PauloLuan and see if that solves it for you. I'm using Node 6.11.4

@WhatsNewSaes

This comment has been minimized.

WhatsNewSaes commented Nov 3, 2017

I'm getting the same error... Just tried what @abloom12 said and that didn't work for me.

@ajmalafif

This comment has been minimized.

ajmalafif commented Nov 7, 2017

I think it could be because of one of the dependencies, https://github.com/notatestuser/gift is out of date? Look here: https://david-dm.org/shinnn/gulp-gh-pages#info=devDependencies

Having same exact error here's my build on Travis:
https://travis-ci.org/ajmalafif/staging

And my gulp file:
https://github.com/ajmalafif/staging/blob/master/gulpfile.js#L408

@WhatsNewSaes

This comment has been minimized.

WhatsNewSaes commented Nov 7, 2017

Interesting. So I just tried this on a personal repo and it worked, when I tried it in an organization that I'm invited to it didn't. Does it possibly have something to do with if you have permissions to the "settings" of a repo?

@ajmalafif

This comment has been minimized.

ajmalafif commented Nov 8, 2017

@WhatsNewSaes hi thanks for updating. is it possible to share the repo or it's a private one? Mine is personal repo so I suspected there are different in setup or dependencies that make it work?

@renatodeleao

This comment has been minimized.

renatodeleao commented Nov 8, 2017

Owner of an organisation, admin privileges, open-source project. Also having this error.

@jfairchild jfairchild referenced this issue Nov 13, 2017

Merged

Jeff/v2 #48

@derekblank

This comment has been minimized.

derekblank commented Nov 14, 2017

+1 to the above...org owner, admin, and open source. Same issue:

[17:20:53] Starting 'gh-pages'...
~/node_modules/gift/lib/commit.js:135
      _ref = /^.+? (.*) (\d+) .*$/.exec(line), m = _ref[0], actor = _ref[1], epoch = _ref[2];
                                                       ^

TypeError: Cannot read property '0' of null
    at Function.module.exports.Commit.actor (~/node_modules/gift/lib/commit.js:135:56)
@gido

This comment has been minimized.

gido commented Nov 14, 2017

The source of the problem is documented here notatestuser/gift#96
and PR #117 will fix it

@acierto

This comment has been minimized.

acierto commented Jan 30, 2018

Actually not, tried with "gift": "0.10.2" and still the issue is not gone.

screen shot 2018-01-30 at 14 39 34

Test case for me:
I'm running ghPages on Jenkins (on Ubuntu), which first checkouts a revision from a master. And tried to commit generated sources based on that revision.
Most interesting that it was working till today, I have such feeling that the problem due to some other third-party library.

@radumas

This comment has been minimized.

radumas commented Feb 7, 2018

I did npm install --save-dev gift and then re-ran gulp deploy and it worked.

@acierto

This comment has been minimized.

acierto commented Feb 8, 2018

Cool, but you know it is from the topic: "It works on my machine" :)

I don't see myself any issue on Mac, but it reproducible in 100% on Ubuntu 16.

@jdnichollsc

This comment has been minimized.

jdnichollsc commented Feb 11, 2018

I can reproduce this issue on Mac with v6.11.4

@radumas

This comment has been minimized.

radumas commented Feb 12, 2018

Cool, but you know it is from the topic: "It works on my machine" :)

I don't see myself any issue on Mac, but it reproducible in 100% on Ubuntu 16.

Sorry my solution was incomplete. Forgot a step I did before... Need to upgrade gift within the gulp-gh-pages module.

cd node_modules/gulp-gh-pages/
npm install --save gift@0.10.2
cd ../../
gulp deploy

This worked in both Ubuntu 16.04 and a Windows 7 corporate environment

@nicothin

This comment has been minimized.

nicothin commented Feb 24, 2018

I see the problem on my computer (windows 10) and on the computers of my students.

Is this the problem of the version of one of the dependencies of this package?
When will this be fixed?
(it looks like it's necessary to replace a couple of digits in the dependency version)

@NikolaySolodukhin

This comment has been minimized.

NikolaySolodukhin commented Apr 21, 2018

@nicothin gulp-gh-pages-will Use this package and everything will be ok)

@pirhoo

This comment has been minimized.

pirhoo commented May 18, 2018

It doesn't look like this repository is maintained anymore... I simply switched to gh-pages, it's painless:

var ghpages = require('gh-pages'),
       path = require('path');

gulp.task('deploy', function(cb) {
  ghpages.publish(path.join(process.cwd(), 'dist'), cb);
});

@haveyaseen haveyaseen referenced this issue Jun 10, 2018

Merged

Update dependencies #206

11 of 11 tasks complete

haveyaseen added a commit to haveyaseen/redux-orm that referenced this issue Jun 10, 2018

haveyaseen added a commit to tommikaikkonen/redux-orm that referenced this issue Jun 11, 2018

Update dependencies (#206)
* update webpack to v4, gulp to v4, jest to v23, codecov to v3, cross-env to v5

* update eslint to v4

* update rimraf to v2.6.2

* remove function-paren-newline ESLint rule for readability

* split up webpack config, build dev files again

* change sourcemaps to better fit production and development modes

* pass rimraf directories as arguments instead of calling rimraf multiple times

* add test:watch commands, do not report coverage by default (still do it in Travis)

* remove babel-jest

* using different release of gulp-gh-pages to circumvent shinnn/gulp-gh-pages#116

@shinnn shinnn closed this in c317690 Jul 13, 2018

@shinnn shinnn changed the title from TypeError: Cannot read property '0' of null to Older version of gift refers to an inaccessible property Aug 12, 2018

Repository owner locked as resolved and limited conversation to collaborators Aug 12, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.