Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 9.27, unable to build from source #4007

Closed
3 tasks done
zwolfpack opened this issue Nov 13, 2024 · 14 comments · Fixed by #4018
Closed
3 tasks done

Version 9.27, unable to build from source #4007

zwolfpack opened this issue Nov 13, 2024 · 14 comments · Fixed by #4018
Labels
bug Something isn't working

Comments

@zwolfpack
Copy link

Checklist

  • I am not using Home Assistant. Or: a developer has told me to come here.
  • I have checked the troubleshooting section and my problem is not described there.
  • I have read the changelog and my problem is not mentioned there.

Deploy method

Manually built (git clone - npm run build - npm install

Z-Wave JS UI version

9.27.2

ZwaveJS version

n/a

Describe the bug

Version 9.27, when building from source "npm run build" fails.
https://zwave-js.github.io/zwave-js-ui/#/getting-started/other-methods?id=nodejs-or-pkg-version

To Reproduce

git clone https://github.com/zwave-js/zwave-js-ui
cd zwave-js-ui
npm install
npm run build

Expected behavior

"npm run build" should complete successfully.

Additional context

System: Raspberry Pi 3 or 5, RaspberryOS version 12 (bookworm), node version 20.18.0, npm version 10.8.2

Output from "npm run build"

> [email protected] build
> npm-run-all build:*


> [email protected] build:server
> tsc


> [email protected] build:ui
> vite build

/home/pi/git/zwave-js-ui/node_modules/rollup/dist/native.js:63
                throw new Error(
                      ^

Error: Cannot find module @rollup/rollup-linux-arm-gnueabihf. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
    at requireWithFriendlyError (/home/pi/git/zwave-js-ui/node_modules/rollup/dist/native.js:63:9)
    at Object.<anonymous> (/home/pi/git/zwave-js-ui/node_modules/rollup/dist/native.js:72:76)
    ... 3 lines matching cause stack trace ...
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at cjsLoader (node:internal/modules/esm/translators:346:17)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:286:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:473:24) {
  [cause]: Error: Cannot find module '@rollup/rollup-linux-arm-gnueabihf'
  Require stack:
  - /home/pi/git/zwave-js-ui/node_modules/rollup/dist/native.js
      at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
      at Module._load (node:internal/modules/cjs/loader:1051:27)
      at Module.require (node:internal/modules/cjs/loader:1311:19)
      at require (node:internal/modules/helpers:179:18)
      at requireWithFriendlyError (/home/pi/git/zwave-js-ui/node_modules/rollup/dist/native.js:45:10)
      at Object.<anonymous> (/home/pi/git/zwave-js-ui/node_modules/rollup/dist/native.js:72:76)
      at Module._compile (node:internal/modules/cjs/loader:1469:14)
      at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
      at Module.load (node:internal/modules/cjs/loader:1288:32)
      at Module._load (node:internal/modules/cjs/loader:1104:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/home/pi/git/zwave-js-ui/node_modules/rollup/dist/native.js' ]
  }
}

Node.js v20.18.0
ERROR: "build:ui" exited with 1.

@zwolfpack zwolfpack added the bug Something isn't working label Nov 13, 2024
@robertsLando
Copy link
Member

robertsLando commented Nov 14, 2024

Did you try to follow error instructions?

Error: Cannot find module @rollup/rollup-linux-arm-gnueabihf. npm has a bug related to optional dependencies (npm/cli#4828). Please try npm i again after removing both package-lock.json and node_modules directory.

I would also suggest to drop node_modules folder and run npm i again

@zwolfpack
Copy link
Author

Sorry, should have mentioned that.
After deleting node_modules/ and moving aside package-lock.json, ran "npm i" again. That completed and generated a new (slightly larger) package-lock.json. But then "npm run build" failed earlier than before:

> [email protected] build
> npm-run-all build:*


> [email protected] build:server
> tsc

api/lib/logger.ts:96:49 - error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.

96     info.timestamp = colorizer.colorize('time', info.timestamp)
                                                   ~~~~~~~~~~~~~~

api/lib/logger.ts:97:47 - error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.

97     info.label = colorizer.colorize('module', info.label || '-')
                                                 ~~~~~~~~~~~~~~~~~


Found 2 errors in the same file, starting at: api/lib/logger.ts:96

ERROR: "build:server" exited with 2.

@zwolfpack
Copy link
Author

Additional info
After successful build of v9.26.0, contents of node_modules/@rollup is

drwxr-xr-x   4 zwave-js-ui zwave-js-ui  4096 Oct 30 11:30 plugin-node-resolve
drwxr-xr-x   6 zwave-js-ui zwave-js-ui  4096 Oct 30 11:30 plugin-terser
drwxr-xr-x   4 zwave-js-ui zwave-js-ui  4096 Oct 30 11:30 pluginutils
drwxr-xr-x   2 zwave-js-ui zwave-js-ui  4096 Oct 30 11:30 rollup-linux-arm-gnueabihf
drwxr-xr-x   2 zwave-js-ui zwave-js-ui  4096 Oct 30 11:30 rollup-linux-arm-musleabihf

After first build of v9.27.2, contents of same is

drwxr-xr-x   4 pi pi  4096 Nov 13 13:11 plugin-node-resolve
drwxr-xr-x   5 pi pi  4096 Nov 13 13:11 plugin-terser
drwxr-xr-x   4 pi pi  4096 Nov 13 13:11 pluginutils

Missing is the module that is complained about in the original error.
Then after deleting distribution package-lock.json and re-running, the "missing" module appears.

drwxr-xr-x   4 pi pi  4096 Nov 14 00:14 plugin-node-resolve
drwxr-xr-x   5 pi pi  4096 Nov 14 00:12 plugin-terser
drwxr-xr-x   4 pi pi  4096 Nov 14 00:14 pluginutils
drwxr-xr-x   2 pi pi  4096 Nov 14 00:11 rollup-linux-arm-gnueabihf

@zwolfpack
Copy link
Author

zwolfpack commented Nov 14, 2024

Comparing three versions of package-lock.json,
(1) from v9.26.0
(2) from 9.27.2 distribution
(3) from 9.27.2 after removal of distribution copy and regenerated via "npm install"

All three have an entry for "@rollup/rollup-linux-arm-gnueabihf" in an "optionalDependencies" section. And all three list different versions for this.

However (1) and (3) also have this section, version number adjusted accordingly.

    "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
      "version": "4.18.0",
      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz",
      "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==",
      "cpu": [
        "arm"
      ],
      "dev": true,
      "optional": true,
      "os": [
        "linux"
      ]
    },

Without this in (2), would npm be able to download this module?

@robertsLando
Copy link
Member

robertsLando commented Nov 14, 2024

I don't understand why that issue happens as in all the instances I tried to clone and build the repo it works, I'm quite sure the issue is something related to your local development env

@madcow27
Copy link

madcow27 commented Nov 14, 2024

Hi,

EDIT : not relevant for the current issue. Sorry.

With the Zwave plugin on Jeedom system we are currently facing the same compilation error with tsc.

`+ echo '*******************Begin of package installation******************'
*******************Begin of package installation******************
+ touch /tmp/jeedom_install_in_progress_zwavejs
+ echo 1
+ echo 2
+ sudo chmod +x /var/www/html/core/class/../../plugins/zwavejs/resources/pre_install.sh
+ sudo /var/www/html/core/class/../../plugins/zwavejs/resources/pre_install.sh
+ echo 'Pre installation de l'\''installation/mise à jour des dépendances zwavejs'
Pre installation de l'installation/mise à jour des dépendances zwavejs
+++ dirname /var/www/html/core/class/../../plugins/zwavejs/resources/pre_install.sh
++ cd /var/www/html/core/class/../../plugins/zwavejs/resources
++ pwd
+ BASEDIR=/var/www/html/plugins/zwavejs/resources
+ cd /var/www/html/plugins/zwavejs/resources
+ source ../core/config/zwavejs.config.ini
+ echo 'Wanted Version: 9.20.0'
Wanted Version: 9.20.0
+ rm -R zwave-js-ui
+ git clone --branch v9.20.0 --depth 1 https://github.com/zwave-js/zwave-js-ui
Cloning into 'zwave-js-ui'...
Note: switching to 'bf3bdc3f13d903cf100b0ba9c3333101ffd29418'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

+ echo 'Pre install finished'
Pre install finished
+ echo 3
+ php /var/www/html/core/class/../php/jeecli.php plugin install mqtt2
+ echo 4
+ sudo killall apt apt-get unattended-upgr
apt: no process found
apt-get: no process found
+ sudo rm /var/lib/apt/lists/lock
+ sudo rm /var/cache/apt/archives/lock
+ sudo rm /var/lib/dpkg/lock /var/lib/dpkg/lock-frontend
+ sudo sudo dpkg --configure -a --force-confdef
+ sudo apt update

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease
Get:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease [15.0 kB]
Hit:3 https://deb.nodesource.com/node_20.x nodistro InRelease
Get:4 https://pkgs.tailscale.com/stable/raspbian bullseye InRelease
Fetched 21.6 kB in 2s (12.0 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
135 packages can be upgraded. Run 'apt list --upgradable' to see them.
+ echo 5
+ sudo chmod +x /var/www/html/core/class/../../resources/install_nodejs.sh
+ sudo /var/www/html/core/class/../../resources/install_nodejs.sh
Hit:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Hit:2 http://archive.raspberrypi.org/debian bullseye InRelease
Hit:3 https://deb.nodesource.com/node_20.x nodistro InRelease
Get:4 https://pkgs.tailscale.com/stable/raspbian bullseye InRelease
Fetched 6581 B in 3s (2351 B/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
apt-utils is already the newest version (2.2.4).
build-essential is already the newest version (12.9).
git is already the newest version (1:2.30.2-1+deb11u3).
lsb-release is already the newest version (11.1.0+rpi1).
0 upgraded, 0 newly installed, 0 to remove and 135 not upgraded.
[Check Version NodeJS actuelle : v20.17.0 : [  OK  ]
[Check Prefix : /usr and sudo prefix : /usr and www-data prefix : /usr : [  OK  ]
Clean npm cache
npm warn using --force Recommended protections disabled.
+ echo 6
+ sudo chmod +x /var/www/html/core/class/../../resources/install_nodejs.sh
+ sudo /var/www/html/core/class/../../resources/install_nodejs.sh
Hit:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Hit:2 http://archive.raspberrypi.org/debian bullseye InRelease
Hit:3 https://deb.nodesource.com/node_20.x nodistro InRelease
Get:4 https://pkgs.tailscale.com/stable/raspbian bullseye InRelease
Fetched 6581 B in 2s (3658 B/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
apt-utils is already the newest version (2.2.4).
build-essential is already the newest version (12.9).
git is already the newest version (1:2.30.2-1+deb11u3).
lsb-release is already the newest version (11.1.0+rpi1).
0 upgraded, 0 newly installed, 0 to remove and 135 not upgraded.
[Check Version NodeJS actuelle : v20.17.0 : [  OK  ]
[Check Prefix : /usr and sudo prefix : /usr and www-data prefix : /usr : [  OK  ]
Clean npm cache
npm warn using --force Recommended protections disabled.
+ echo 7
+ sudo chmod +x /var/www/html/core/class/../../resources/install_nodejs.sh
+ sudo /var/www/html/core/class/../../resources/install_nodejs.sh
Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Hit:3 https://deb.nodesource.com/node_20.x nodistro InRelease
Get:4 https://pkgs.tailscale.com/stable/raspbian bullseye InRelease
Fetched 6581 B in 2s (4143 B/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
apt-utils is already the newest version (2.2.4).
build-essential is already the newest version (12.9).
git is already the newest version (1:2.30.2-1+deb11u3).
lsb-release is already the newest version (11.1.0+rpi1).
0 upgraded, 0 newly installed, 0 to remove and 135 not upgraded.
[Check Version NodeJS actuelle : v20.17.0 : [  OK  ]
[Check Prefix : /usr and sudo prefix : /usr and www-data prefix : /usr : [  OK  ]
Clean npm cache
npm warn using --force Recommended protections disabled.
+ echo 8
+ sudo chmod +x /var/www/html/core/class/../../resources/install_composer.sh
+ sudo /var/www/html/core/class/../../resources/install_composer.sh
Begin installation of composer
--2024-11-12 00:40:08--  https://getcomposer.org/installer
Resolving getcomposer.org (getcomposer.org)... 2001:41d0:302:1100::8:104f, 54.36.53.46
Connecting to getcomposer.org (getcomposer.org)|2001:41d0:302:1100::8:104f|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 58444 (57K) [application/octet-stream]
Saving to: 'composer-setup.php'

     0K .......... .......... .......... .......... .......... 87% 3.30M 0s
    50K .......                                               100% 16.2M=0.02s

2024-11-12 00:40:08 (3.66 MB/s) - 'composer-setup.php' saved [58444/58444]

All settings correct for using Composer
Downloading...

Composer (version 2.8.2) successfully installed to: /var/www/html/core/ajax/composer.phar
Use it: php composer.phar

End installation of composer
+ echo 9
+ sudo NODE_OPTIONS=--dns-result-order=ipv4first npm install --force -g yarn
npm warn using --force Recommended protections disabled.

changed 1 package in 8s
+ echo 10
+ sudo chmod +x /var/www/html/core/class/../../plugins/zwavejs/resources/post_install.sh
+ sudo /var/www/html/core/class/../../plugins/zwavejs/resources/post_install.sh
+ echo 'Post installation de l'\''installation/mise à jour des dépendances zwavejs'
Post installation de l'installation/mise à jour des dépendances zwavejs
+++ dirname /var/www/html/core/class/../../plugins/zwavejs/resources/post_install.sh
++ cd /var/www/html/core/class/../../plugins/zwavejs/resources
++ pwd
+ BASEDIR=/var/www/html/plugins/zwavejs/resources
+ cd /var/www/html/plugins/zwavejs/resources
+ cd zwave-js-ui
+ sudo yarn install
yarn install v1.22.22
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/5] Validating package.json...
[2/5] Resolving packages...
warning [email protected]: Please use another csrf package
warning native-url > [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning [email protected]: Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.
warning @types/[email protected]: This is a stub types definition. extract-zip provides its own type definitions, so you do not need this installed.
warning docsify-cli > [email protected]: docsify-server-renderer 4.x and below is no longer supported while we investigate the future of SSR and SSG for Docsify
warning [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options.
warning eslint > @humanwhocodes/[email protected]: Use @eslint/config-array instead
warning eslint > @humanwhocodes/config-array > @humanwhocodes/[email protected]: Use @eslint/object-schema instead
warning eslint > file-entry-cache > flat-cache > [email protected]: Rimraf versions prior to v4 are no longer supported
warning eslint > file-entry-cache > flat-cache > rimraf > [email protected]: Glob versions prior to v9 are no longer supported
warning eslint > file-entry-cache > flat-cache > rimraf > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
warning mocha > [email protected]: Glob versions prior to v9 are no longer supported
warning mocha > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
warning release-it > shelljs > [email protected]: Glob versions prior to v9 are no longer supported
warning vite-plugin-pwa > workbox-build > [email protected]: Glob versions prior to v9 are no longer supported
warning vite-plugin-pwa > workbox-build > @rollup/plugin-replace > magic-string > [email protected]: Please use @jridgewell/sourcemap-codec instead
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning " > @zwave-js/[email protected]" has unmet peer dependency "@zwave-js/core@>=10.0.0".
warning " > @zwave-js/[email protected]" has unmet peer dependency "@zwave-js/shared@>=10.0.0".
warning " > @zwave-js/[email protected]" has unmet peer dependency "winston-transport@^4.5.0".
warning " > [email protected]" has unmet peer dependency "uuid@^3.4.0 || ^7.0.0 || ^8.0.0 || ^9.0.0".
warning " > [email protected]" has unmet peer dependency "vis-util@^5.0.1".
warning " > [email protected]" has unmet peer dependency "@egjs/hammerjs@^2.0.0".
warning " > [email protected]" has unmet peer dependency "component-emitter@^1.3.0".
warning " > [email protected]" has unmet peer dependency "keycharm@^0.2.0 || ^0.3.0 || ^0.4.0".
warning " > [email protected]" has unmet peer dependency "uuid@^3.4.0 || ^7.0.0 || ^8.0.0 || ^9.0.0".
warning " > [email protected]" has unmet peer dependency "vis-util@^5.0.1".
warning " > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > [email protected]" has unmet peer dependency "workbox-build@^7.1.0".
warning " > [email protected]" has unmet peer dependency "workbox-window@^7.1.0".
[5/5] Building fresh packages...
success Saved lockfile.
Done in 223.70s.
+ sudo NODE_OPTIONS=--max_old_space_size=2048 yarn run build
yarn run v1.22.22
$ npm-run-all 'build:*'
$ tsc
api/lib/logger.ts(94,49): error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.
api/lib/logger.ts(95,47): error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "build:server" exited with 2.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
+ chown -R www-data:www-data CHANGELOG.md LICENSE README.md SECURITY.md api certs docker docs esbuild-register.js esbuild.js genereteDocs.ts index.html kubernetes kustomization.yaml node_modules nodemon.json package-lock.json package.json package.sh pkg public server server_config.js snippets src store test tsconfig.eslint.json tsconfig.json vite.config.mjs wallaby.js yarn.lock
+ '[' -e /dev/ttyAMA0 ']'
+ sudo sed -i 's/console=ttyAMA0,115200//; s/kgdboc=ttyAMA0,115200//' /boot/cmdline.txt
+ sudo sed -i 's|[^:]*:[^:]*:respawn:/sbin/getty[^:]*ttyAMA0[^:]*||' /etc/inittab
sed: can't read /etc/inittab: No such file or directory
+ '[' -e /dev/ttymxc0 ']'
+ '[' -e /dev/ttyAMA0 ']'
+ sudo systemctl mask [email protected]
+ sudo systemctl stop [email protected]
++ grep Revision /proc/cpuinfo
++ cut -d: -f2
++ tr -d ' '
+ RPI_BOARD_REVISION=a02082
+ [[ a02082 ==   � \8� ]]
+ systemctl disable hciuart
++ grep dtoverlay=pi3-miniuart-bt /boot/config.txt
+ [[ ! -n dtoverlay=pi3-miniuart-bt ]]
+ echo 'Everything is successfully installed!'
Everything is successfully installed!
+ echo 11
+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end zwavejs
+ echo 12
+ rm /tmp/jeedom_install_in_progress_zwavejs
+ echo '*******************End of package installation******************'
*******************End of package installation******************`

@kpine
Copy link
Contributor

kpine commented Nov 14, 2024

I don't understand why that issue happens as in all the instances I tried to clone and build the repo it works, I'm quite sure the issue is something related to your local development env

@robertsLando Have you tried building on an ARM platform? It might only be a problem there. FYI, the ZUI add-on build is failing for the same reason. https://github.com/hassio-addons/addon-zwave-js-ui/actions/runs/11821384040/job/32936018216?pr=727

Your container build has a pre-build step and all the platforms share the output. Maybe that's why you don't see a problem in CI like the add-on does?

@kpine
Copy link
Contributor

kpine commented Nov 14, 2024

With the Zwave plugin on Jeedom system we are currently facing the same compilation error with tsc.

@madcow27 Your build errors are not the same. This project uses npm to build, but you are running yarn commands. yarn has not been used to build for quite some time now, including in v9.20.0.

git clone https://github.com/zwave-js/zwave-js-ui
cd zwave-js-ui
npm install
npm run build

@zwolfpack
Copy link
Author

zwolfpack commented Nov 14, 2024

Comparing package-lock.json from v9.26.0 to v9.27.2, it appears the latter may only support cpu x64. Search `"cpu":' in both to see the difference.

Hacking package-lock.json as follows allows a successful build on my platform.

2743a2744,2756
>     "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
>       "version": "4.24.3",
>       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.3.tgz",
>       "cpu": [
>         "arm"
>       ],
>       "dev": true,
>       "license": "MIT",
>       "optional": true,
>       "os": [
>         "linux"
>       ]
>     },

@robertsLando
Copy link
Member

@robertsLando Have you tried building on an ARM platform? It might only be a problem there. FYI, the ZUI add-on build is failing for the same reason. hassio-addons/addon-zwave-js-ui/actions/runs/11821384040/job/32936018216?pr=727

Your container build has a pre-build step and all the platforms share the output. Maybe that's why you don't see a problem in CI like the add-on does?

@kpine definitely! I always had problems with building UI on arm also I consider it a useless waste of time to install all dev deps for all platforms just to build UI so I introduced that pre-build step and it's a time saving! About the issue I think that's due to some new deps @AlCalzone is using in v14? cc @AlCalzone any clue?

@AlCalzone
Copy link
Member

If I'm not mistaken, rollup is a vite dependency, which is used to bundle the UI. I don't think this could be related to changes on the driver side, since it's already packaged at this stage.

@robertsLando
Copy link
Member

robertsLando commented Nov 15, 2024

What I don't understand then is why this suddenly stopped working without any dep update on my side 😢

Anyway the only fix they suggest is to use npm install instead of npm ci to make it work. I suggest also to home assistant addon to use the same solution at least till npm/cli#4828 isn't fixed or there is a workaround to this

@AlCalzone
Copy link
Member

AlCalzone commented Nov 15, 2024

I think I know why. zwave-js now has vitest as a devDependency, which depends on vite 5.4.0, which depends on rollup 4.24.3.
zwave-js-ui depends on vite ^5.3.1, which would depend on rollup 4.18.0.

Since the version ranges that zwave-js depends on also satisfy the ones zwave-js-ui depends on, it seems that npm installs those now. And apparently, npm does not like those.

Side note...

Fuck npm 🙃

@dearekaelle
Copy link

this change to package.json allows to build on my system

183a184,186
>   "optionalDependencies": {
> 	  "@rollup/rollup-linux-arm64-musl": "4.24.3"
>   },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants