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

don't working in node 14 #197

Open
5 tasks done
Debbl opened this issue Dec 19, 2023 · 2 comments
Open
5 tasks done

don't working in node 14 #197

Debbl opened this issue Dec 19, 2023 · 2 comments

Comments

@Debbl
Copy link

Debbl commented Dec 19, 2023

Describe the bug

I get an error, because the node 14 doesn't have built-in node:timers/promises

related issues #192

internal/process/esm_loader.js:74
    internalBinding('errors').triggerUncaughtException(
                              ^

Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: node:timers/promises
    at new NodeError (internal/errors.js:322:7)
    at Loader.builtinStrategy (internal/modules/esm/translators.js:285:11)
    at new ModuleJob (internal/modules/esm/module_job.js:63:26)
    at Loader.getModuleJob (internal/modules/esm/loader.js:258:11)
    at async ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:78:21)
    at async Promise.all (index 11)
    at async link (internal/modules/esm/module_job.js:83:9) {
  code: 'ERR_UNKNOWN_BUILTIN_MODULE'
}

Reproduction

sudo npm i n -g
sudo n 14
ni

the error

internal/process/esm_loader.js:74
    internalBinding('errors').triggerUncaughtException(
                              ^

Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: node:timers/promises
    at new NodeError (internal/errors.js:322:7)
    at Loader.builtinStrategy (internal/modules/esm/translators.js:285:11)
    at new ModuleJob (internal/modules/esm/module_job.js:63:26)
    at Loader.getModuleJob (internal/modules/esm/loader.js:258:11)
    at async ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:78:21)
    at async Promise.all (index 11)
    at async link (internal/modules/esm/module_job.js:83:9) {
  code: 'ERR_UNKNOWN_BUILTIN_MODULE'
}

It seems to be an extra problem, it works if I change execa to 7.1.1.

- "execa": "^8.0.1",
+ "execa": "^7.1.1",

Reproduction

above

System Info

System:
    OS: macOS 14.2
    CPU: (8) x64 Apple M1 Pro
    Memory: 43.56 MB / 16.00 GB
    Shell: 3.2.57 - /bin/sh
  Binaries:
    Node: 14.20.0 - /usr/local/bin/node
    npm: 6.14.17 - /usr/local/bin/npm
    bun: 1.0.14 - /opt/homebrew/bin/bun
  Browsers:
    Chrome: 120.0.6099.109
    Safari: 17.2

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@Cheng-DX
Copy link

In some new version of ni has dropped node v14 support, you can use some old versions like 0.21.3, which is fine with v14

@antfu
Copy link
Member

antfu commented Mar 21, 2024

I don't mind downgrading execa, but for future-proof I'd also suggest you to upgrade your node.

PR Welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants