It stopped working after upgrade to Node v22
ivzh-ioki opened this issue · 2 comments
ivzh-ioki commented
Hi dear contributors,
Could you please help me understand what could have gone wrong? I just updated the version of Node via nvm
and the lib stopped working completely. And the stacktrace isn't really helpful, at least for me. So...
Error
# /Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node[52376]: void node::fs::InternalModuleStat(const FunctionCallbackInfo<v8::Value> &) at ../src/node_file.cc:1037
# Assertion failed: (args.Length()) >= (2)
----- Native stack trace -----
1: 0x1027eb778 node::Assert(node::AssertionInfo const&) [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
2: 0x1043fad80 node::fs::InternalModuleStat(v8::FunctionCallbackInfo<v8::Value> const&) (.cold.3) [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
3: 0x1027ff8c0 node::fs::InternalModuleStat(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
4: 0x1033c6f98 Builtins_CallApiCallbackGeneric [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
5: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
6: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
7: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
8: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
9: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
10: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
11: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
12: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
13: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
14: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
15: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
16: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
17: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
18: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
19: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
20: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
21: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
22: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
23: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
24: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
25: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
26: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
27: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
28: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
29: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
30: 0x1033c4ef0 Builtins_InterpreterEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
31: 0x1033c2c0c Builtins_JSEntryTrampoline [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
32: 0x1033c28f4 Builtins_JSEntry [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
33: 0x102b5adbc v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
34: 0x102b5a700 v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
35: 0x102a2b520 v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
36: 0x1027c77fc node::builtins::BuiltinLoader::CompileAndCall(v8::Local<v8::Context>, char const*, node::Realm*) [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
37: 0x102875a88 node::Realm::ExecuteBootstrapper(char const*) [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
38: 0x1027a5c60 node::StartExecution(node::Environment*, char const*) [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
39: 0x1027a5b80 node::StartExecution(node::Environment*, std::__1::function<v8::MaybeLocal<v8::Value> (node::StartExecutionCallbackInfo const&)>) [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
40: 0x10270e460 node::LoadEnvironment(node::Environment*, std::__1::function<v8::MaybeLocal<v8::Value> (node::StartExecutionCallbackInfo const&)>, std::__1::function<void (node::Environment*, v8::Local<v8::Value>, v8::Local<v8::Value>)>) [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
41: 0x102835c98 node::NodeMainInstance::Run(node::ExitCode*, node::Environment*) [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
42: 0x102835a90 node::NodeMainInstance::Run() [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
43: 0x1027a959c node::Start(int, char**) [/Users/<my_user>/.nvm/versions/node/v22.11.0/bin/node]
44: 0x1836e8274 start [/usr/lib/dyld]
----- JavaScript stack trace -----
1: /Users/<my_user>/Documents/<my_project>/node_modules/esm/esm.js:1:34535
2: /Users/<my_user>/Documents/<my_project>/node_modules/esm/esm.js:1:34176
3: /Users/<my_user>/Documents/<my_project>/node_modules/esm/esm.js:1:34506
4: /Users/<my_user>/Documents/<my_project>/node_modules/esm/esm.js:1:173374
5: /Users/<my_user>/Documents/<my_project>/node_modules/esm/esm.js:1:173420
6: /Users/<my_user>/Documents/<my_project>/node_modules/esm/esm.js:1:173521
7: /Users/<my_user>/Documents/<my_project>/node_modules/esm/esm.js:1:258942
8: /Users/<my_user>/Documents/<my_project>/node_modules/esm/esm.js:1:261569
9: e (/Users/<my_user>/Documents/<my_project>/node_modules/esm/esm.js:1:262673)
10: get (/Users/<my_user>/Documents/<my_project>/node_modules/esm/esm.js:1:262740)
Context
The script crashes when we fire the displayUnusedTranslations
action:
const i18nUnused = require('i18n-unused');
...
const unusedTranslations = await i18nUnused.displayUnusedTranslations();
axelmarciano commented
Hi, I've opened a PR #48 to address the issue with Node.js 22 compatibility.
ivzh-ioki commented
@axelmarciano Just confirming that it works, thank you!