diff --git a/bundle-pkgs.js b/bundle-pkgs.js index 764b2d2e..5759c100 100644 --- a/bundle-pkgs.js +++ b/bundle-pkgs.js @@ -8,7 +8,7 @@ const blacklist = [ 'node-red', 'npm', 'ain2', - 'node-red-contrib-theme-midnight-red' + '@node-red-contrib-themes/midnight-red' ]; const extraFiles = { @@ -28,11 +28,19 @@ const extraFiles = { const remove = []; const repo = {}; +// TODO handle scoped packages + Object.keys(pkgLib.dependencies).forEach(name => { if (blacklist.includes(name)) { return; } - const pkgJson = require(__dirname + '/addon_tmp/redmatic/lib/node_modules/' + name + '/package.json'); + let pkgJson; + try { + pkgJson = require(__dirname + '/addon_tmp/redmatic/lib/node_modules/' + name + '/package.json'); + } catch (err) { + console.error(err.message); + return; + } const {version, description, keywords, homepage, repository} = pkgJson; const filename = 'redmatic-pkg-' + name + '-' + version + '.tar.gz'; diff --git a/package.json b/package.json index 0735bd21..37c6c24e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redmatic", - "version": "5.4.0", + "version": "5.4.1", "description": "Node-RED packaged as Homematic CCU addon", "repository": "github:rdmtc/redmatic", "private": true,