Hey everyone,
While testing the latest @nodesecure/cli, I noticed that running nsecure cwd on Node.js v20.19.0 crashes immediately.
The error is:
TypeError: Promise.withResolvers is not a function
Screenshot: :
This seems related to Promise.withResolvers(), which is not available in Node 20.
I know the current CLI targets newer Node.js versions, so this may not be a Node 20 support issue.
The main problem is that the CLI currently fails with an internal stack trace, which can be confusing for users who install and run it with an unsupported Node.js version.
Maybe we can improve this by adding an early Node.js version check before executing the CLI commands.
Example message:
@nodesecure/cli requires Node.js >=24.
Current version: v20.19.0
Environment:
- OS: Windows
- Node.js: v20.19.0
- Command:
nsecure cwd
- CLI version: latest installed from npm
I can open a small PR for this if you think this improvement makes sense.
Hey everyone,
While testing the latest
@nodesecure/cli, I noticed that runningnsecure cwdon Node.js v20.19.0 crashes immediately.The error is:
Screenshot: :
This seems related to
Promise.withResolvers(), which is not available in Node 20.I know the current CLI targets newer Node.js versions, so this may not be a Node 20 support issue.
The main problem is that the CLI currently fails with an internal stack trace, which can be confusing for users who install and run it with an unsupported Node.js version.
Maybe we can improve this by adding an early Node.js version check before executing the CLI commands.
Example message:
Environment:
nsecure cwdI can open a small PR for this if you think this improvement makes sense.