I was compiling a CLI with update-notifier.
However, they're lazy importing - which results in packages being missed when compiling.
Their code looks like this:
const importLazy = require('import-lazy')(require);
const isCi = importLazy('is-ci');
The compiled code expects is-ci to be a dependency.
Here's a related issue someone raised with them: https://github.com/yeoman/update-notifier/issues/123.
PS: This is a great package.
I just ran into this same issue (hi @mrmckeb :wave:). I worked around this by making update-notifier a dependency and then excluding it from compilation by ncc. This works but isn't ideal since the CLI now has some dependencies that need to be installed along with it.
Thanks @iansu - I ended up doing the same thing! It works, and will do as a temporary fix ;)
Hi, I created a fork for that matter because seems like this will never be supported
https://github.com/datacrafts-io/update-notifier-webpack
https://www.npmjs.com/package/update-notifier-webpack
Also, my fork should be always up-to-date thanks to https://github.com/wei/pull bot that will track original package for any updates.
Seems that update-notifier-webpack still doesn't work with ncc since the check.js file attempts to require update-notifier-webpack (require('.')) which ends up requiring the CLI code in the dist dir, rather than the updater package.
Oh, I see now.