node-cron: Installing fails with "opencollective-postinstall: command not found"

Just tried to install node-cron from npm, but couldn’t. Here’s the complete console output:

npm i node-cron
> node-cron@2.0.2 postinstall /Users/johndoe/dev/home/home-server-nodejs/node_modules/node-cron
> opencollective-postinstall

sh: opencollective-postinstall: command not found

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! node-cron@2.0.2 postinstall: `opencollective-postinstall`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the node-cron@2.0.2 postinstall 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/johndoe/.npm/_logs/2018-10-09T20_27_48_949Z-debug.log

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 10
  • Comments: 19 (3 by maintainers)

Commits related to this issue

Most upvoted comments

Still seems to be an issue in v2.0.3

npm ERR! node-cron@2.0.3 postinstall: opencollective-postinstall
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the node-cron@2.0.3 postinstall script.

having this error in ubuntu on google cloud

opencollective-postinstall should be in dependencies, not in devDependencies.

https://github.com/node-cron/node-cron/blob/f451a8df8974407c1ff1e80378a32854502de911/package.json#L32-L40

Been able to work around it by manually installing opencollective-postinstall first. So I guess it’s just missing in your dependencies.