Skip to content

Failed at the foie-graphs@0.0.1 start script #3

Description

@schlos

NPM was installed via homebrew on Mac (brew install node), version:

node -v
v13.6.0

after executing "$ USER=schlos REPO=foie-graphs TOKEN=OAUTH_GUTHUB_token ALAVETELI=http://imamopravoznati.org npm start" I got error:

...
Fetching http://imamopravoznati.org/request/spisak_clanova_vijeca_i_iznosi_n_10.json with 3 items left in the worker queue.
Fetching http://imamopravoznati.org/request/sudske_odluke_u_predmetima_radi_24.json with 2 items left in the worker queue.
Fetching http://imamopravoznati.org/request/registar_djelatnika_u_zdravstvu_2.json with 1 items left in the worker queue.
Fetching http://imamopravoznati.org/request/sudske_odluke_u_predmetima_radi_25.json with 0 items left in the worker queue.
fs.js:143
  throw new ERR_INVALID_CALLBACK(cb);
  ^

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function. Received undefined
    at maybeCallback (fs.js:143:9)
    at Object.writeFile (fs.js:1267:14)
    at Scraper.<anonymous> (/Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats/index.js:38: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) {
  code: 'ERR_INVALID_CALLBACK'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! foie-graphs@0.0.1 start: `node index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the foie-graphs@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

foie-graphs@0.0.1 start script:
https://github.com/codeforcroatia/imamopravoznati-stats/blob/master/index.js

NPM 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 npm@6.13.4
3 info using node@v13.6.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle foie-graphs@0.0.1~prestart: foie-graphs@0.0.1
6 info lifecycle foie-graphs@0.0.1~start: foie-graphs@0.0.1
7 verbose lifecycle foie-graphs@0.0.1~start: unsafe-perm in lifecycle true
8 verbose lifecycle foie-graphs@0.0.1~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:/Users/miroslav/.rbenv/shims:/Users/miroslav/.rbenv/bin:/Users/miroslav/.rbenv/shims:/Users/miroslav/anaconda3/bin:/Users/miroslav/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Applications/Keybase.app/Contents/SharedSupport/bin
9 verbose lifecycle foie-graphs@0.0.1~start: CWD: /Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats
10 silly lifecycle foie-graphs@0.0.1~start: Args: [ '-c', 'node index.js' ]
11 silly lifecycle foie-graphs@0.0.1~start: Returned: code: 1  signal: null
12 info lifecycle foie-graphs@0.0.1~start: Failed to exec start script
13 verbose stack Error: foie-graphs@0.0.1 start: `node index.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 foie-graphs@0.0.1
15 verbose cwd /Users/miroslav/CodeForCroatia/Workspace CFC/imamopravoznati-stats
16 verbose Darwin 18.7.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 foie-graphs@0.0.1 start: `node index.js`
22 error Exit status 1
23 error Failed at the foie-graphs@0.0.1 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Do you have an idea what could be the problem? NPM version?
It worked until now each year, only change this year is that I have fresh OS and fresh homebrew and fresh NPM install.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions