Skip to content
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

Error committing file - repo.js #5

Open
schlos opened this issue Dec 20, 2020 · 3 comments
Open

Error committing file - repo.js #5

schlos opened this issue Dec 20, 2020 · 3 comments

Comments

@schlos
Copy link
Member

schlos commented Dec 20, 2020

Steps:

Error committing file: {"request":{"UNSENT":0,"OPENED":1,"HEADERS_RECEIVED":2,"LOADING":3,"DONE":4,"readyState":4,"responseText":"{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/enterprise/2.18/user/rest/reference/git#get-a-reference\"}","responseXML":"","status":404,"statusText":null,"withCredentials":false,"dataType":"json"},"error":404}

Probably Github API changed since this was done:
https://github.com/codeforcroatia/imamopravoznati-stats/blob/master/lib/repo.js

@schlos
Copy link
Member Author

schlos commented Dec 20, 2020

Tried to update package.json:

from "github-api": "^0.7.0", to "github-api": "^1.0.0",

Another error pops up:

/Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats/lib/repo.js:53
    this.repo.read(branch, path, function(err, content, contentSha) {
              ^

TypeError: this.repo.read is not a function
    at Repo.changed (/Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats/lib/repo.js:53:15)
    at Repo.update (/Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats/lib/repo.js:74:10)
    at Scraper.<anonymous> (/Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats/index-monthly.js:48:8)
    at Scraper.emit (events.js:321:20)
    at Scraper.<anonymous> (/Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats/lib/scraper.js:18:18)
    at next (/Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats/node_modules/async/lib/async.js:726:31)
    at /Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats/node_modules/async/lib/async.js:24:16
    at Timeout._onTimeout (/Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats/node_modules/underscore/underscore.js:620:47)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node index-monthly.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/miroslav/.npm/_logs/2020-12-20T12_14_47_825Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/usr/local/Cellar/node/13.6.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'start'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Applications/Keybase.app/Contents/SharedSupport/bin
9 verbose lifecycle [email protected]~start: CWD: /Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats
10 silly lifecycle [email protected]~start: Args: [ '-c', 'node index-monthly.js' ]
11 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `node index-monthly.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:321:20)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:321:20)
13 verbose stack     at maybeClose (internal/child_process.js:1028:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats
16 verbose Darwin 19.6.0
17 verbose argv "/usr/local/Cellar/node/13.6.0/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v13.6.0
19 verbose npm  v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `node index-monthly.js`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
/Users/miroslav/.npm/_logs/2020-12-20T12_14_47_825Z-debug.log (END)

@schlos
Copy link
Member Author

schlos commented Dec 20, 2020

With "github-api": "^2.3.0", in package.json tried update to newer version:

imamopravoznati-stats % npm install github-api                                                                                                    
+ [email protected]
updated 1 package and audited 123 packages in 4.198s
found 16 vulnerabilities (8 low, 4 moderate, 3 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

Same error:

/Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats/lib/repo.js:53
    this.repo.read(branch, path, function(err, content, contentSha) {
              ^

TypeError: this.repo.read is not a function
    at Repo.changed (/Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats/lib/repo.js:53:15)
    at Repo.update (/Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats/lib/repo.js:74:10)
    at Scraper.<anonymous> (/Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats/index-monthly.js:48:8)
    at Scraper.emit (events.js:321:20)
    at Scraper.<anonymous> (/Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats/lib/scraper.js:18:18)
    at next (/Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats/node_modules/async/lib/async.js:726:31)
    at /Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats/node_modules/async/lib/async.js:24:16
    at Timeout._onTimeout (/Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats/node_modules/underscore/underscore.js:620:47)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node index-monthly.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/miroslav/.npm/_logs/2020-12-20T12_20_53_266Z-debug.log

@schlos
Copy link
Member Author

schlos commented Dec 20, 2020

Tried to update to latest version:

imamopravoznati-stats % npm install github-api                                                                                                    
+ [email protected]

Same error is reproducible as with v1 and v2

I will need help from somebody who understands better github-api and JS...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant