WebThingsIO / zigbee-adapter

Zigbee adapter add-on for WebThings Gateway
Mozilla Public License 2.0
46 stars 29 forks source link

Release workflow failing: Cannot find module 'node:path' #344

Open benfrancis opened 1 month ago

benfrancis commented 1 month ago

The following builds:

Fail with the same error:

Status: Downloaded newer image for webthingsio/toolchain-linux-arm-node-10:latest
WARNING: The requested image's platform (linux/arm/v6) does not match the detected host platform (linux/amd64/v3) and no specific platform was requested
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module 'node:path'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/root/.nvm/versions/node/v10.24.1/lib/node_modules/npm/lib/cli.js:2:18)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `nvm use --delete-prefix v10.24.1 --silent` to unset it.
Error: Process completed with exit code 11.

The linux-x64, node:14 build fails with:

ERROR: npm v10.8.1 is known not to run on Node.js v14.21.3.  This version of npm supports the following node versions: `^18.17.0 || >=20.5.0`. You can find the latest version at [https://nodejs.org/.](https://nodejs.org/)

ERROR:
/root/.nvm/versions/node/v14.21.3/lib/node_modules/npm/lib/utils/error-message.js:11
  er.message &&= replaceInfo(er.message)
             ^^^

SyntaxError: Unexpected token '&&='
    at wrapSafe (internal/modules/cjs/loader.js:1029:16)
    at Module._compile (internal/modules/cjs/loader.js:1078:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
    at Module.load (internal/modules/cjs/loader.js:979:32)
    at Function.Module._load (internal/modules/cjs/loader.js:819:12)
    at Module.require (internal/modules/cjs/loader.js:1003:19)
    at require (internal/modules/cjs/helpers.js:107:18)
    at Object.<anonymous> (/root/.nvm/versions/node/v14.21.3/lib/node_modules/npm/lib/cli/exit-handler.js:2:48)
    at Module._compile (internal/modules/cjs/loader.js:1114:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `nvm use --delete-prefix v14.21.3 --silent` to unset it.
Error: Process completed with exit code 11.

The other builds were automatically cancelled.

See https://github.com/WebThingsIO/zigbee-adapter/actions/runs/9317603077

tim-hellhake commented 1 month ago

The node versions of the addon-builder images are currently broken. This line updates npm to the latest version, which requires at least node 18. After updating nvm to the latest version, this no longer happens.