[Tool] Package Bundler — potentially shrink your app size drastically with this tool

Hi Robert,

I want to install your package but get errors. Any hint what’s wrong?

npm install -g GitHub - robertklep/package-bundler: Bundle a Node.js package into a single file.
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t GitHub - robertklep/package-bundler: Bundle a Node.js package into a single file.
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

Looks like you don’t have Git (as a CLI tool) installed.

This one?

No, those are Github-specific tools, the Git CLI tools can be found here: Git - Downloads

But I’ve updated the installation instructions on how to install without Git: GitHub - robertklep/package-bundler: Bundle a Node.js package into a single file.

1 Like

Hello Robert, just found this pearl :slight_smile:

Is it how you bundled petite-vue.js for homekitty?

No, package-bundler is only used for Node.js packages, petite-vue.js is just provided as-is (although it’s been minified, but that’s how it is provided by unpkg).

I did use it for the homey-api and hap-nodejs packages: https://github.com/robertklep/name.klep.homekitty/tree/main/modules

ok I was wondering how you got the petite-vue.js package, and which version it is :slight_smile:
I think I can use this tool on one or two dependancies to reduce my app size.

I’m using version 0.4.1 (which is the current one).

1 Like