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

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

Open
benfrancis opened this issue Jun 3, 2024 · 1 comment
Open

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

benfrancis opened this issue Jun 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@benfrancis
Copy link
Member

The following builds:

  • linux-arm node:10
  • linux-arm64, node:10
  • linux-x64, node: 12

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
Copy link
Member

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.

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

No branches or pull requests

2 participants