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

Error while starting on Arm Android Smartphone with termux within tmux #137

Closed
3151 opened this issue Feb 5, 2022 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@3151
Copy link

3151 commented Feb 5, 2022

~/TalkerNode $ PORT=3333 node TalkerNode.js
/data/data/com.termux/files/home/TalkerNode/TalkerNode.js:7
var chalk = require('chalk');
^

Error [ERR_REQUIRE_ESM]: require() of ES Module /data/data/com.termux/files/home/node_modules/chalk/source/index.js from /data/data/com.termux/files/home/TalkerNode/TalkerNode.js not supported.
Instead change the require of index.js in /data/data/com.termux/files/home/TalkerNode/TalkerNode.js to a dynamic import() which is available in all CommonJS modules.
at Object. (/data/data/com.termux/files/home/TalkerNode/TalkerNode.js:7:13) {
code: 'ERR_REQUIRE_ESM'
}

Node.js v17.4.0
~/TalkerNode $

@marado
Copy link
Owner

marado commented Feb 5, 2022

According to https://github.com/chalk/chalk/releases/tag/v5.0.0 there are breaking changes, and until TalkerNode adjusts to them (including depending on node >= 12.20), the solution is to specifically depend on chalk 4.

@marado marado self-assigned this Feb 5, 2022
@marado marado added the bug label Feb 5, 2022
@marado marado added this to the 0.7.0 milestone Feb 5, 2022
marado added a commit that referenced this issue Feb 5, 2022
chalk 5 is not retrocompatible (see #137).

For now we are depending on chalk <=4 to fix that, and
Nodiverse >= 0.4.1 (which also depends on chalk <= 4).

In the future we might try to support more recent versions of chalk
too, but that will mean bumping node's dependency to
`"node": "^12.20.0 || ^14.13.1 || >=16.0.0"`, and as we can see in
issue #126 we're still not ready to stop supporting node 10.
@marado
Copy link
Owner

marado commented Feb 5, 2022

Fixed, thanks a ton for reporting this!

@marado marado closed this as completed Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants