-
Notifications
You must be signed in to change notification settings - Fork 59
Description
Describe the bug
Thanks for creating & maintaining pactum! Looks like a great testing library and I'm looking forward to using it.
I noticed an issue when trying to run npx pactum-init
in a node v22.17.1
project, which doesn't occur when I use other node
versions such as 20.19.4
and 18.20.1
.
For what it's worth, I'm using mise as my node
runtime manager, but I don't think this issue is related to mise
, since I can run npx pactum-init
without an issue when using node v18
and node v20
, and I've used mise
for the last couple of years without really any issues like this.
To Reproduce
mkdir pactum-test
cd pactum-test
npm init -y
npm i -D pactum
npx pactum-init
# See the long stack trace
Expected behavior
I would expect that I could run npx pactum-init
like the docs describe here using node v22
without getting an error, similar to how I can when using v18
and v20
Screenshots
If applicable, add screenshots to help explain your problem.
Software (please complete the following information):
- OS: MacOS
- NodeJS Version: 22.17.1
- Test Runner: N/A - this error occurs before I even install a test runner.
Additional context
Full stack trace:
❯ npx pactum-init
# node[20825]: void node::fs::InternalModuleStat(const FunctionCallbackInfo<Value> &) at ../src/node_file.cc:1053
# Assertion failed: (args.Length()) >= (2)
----- Native stack trace -----
1: 0x1041b9830 node::Assert(node::AssertionInfo const&) [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
2: 0x105f86d18 node::fs::InternalModuleStat(v8::FunctionCallbackInfo<v8::Value> const&) (.cold.3) [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
3: 0x1041cb364 node::fs::InternalModuleStat(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
4: 0x104dbef98 Builtins_CallApiCallbackGeneric [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
5: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
6: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
7: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
8: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
9: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
10: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
11: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
12: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
13: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
14: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
15: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
16: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
17: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
18: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
19: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
20: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
21: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
22: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
23: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
24: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
25: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
26: 0x104dbcef0 Builtins_InterpreterEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
27: 0x104dbac0c Builtins_JSEntryTrampoline [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
28: 0x104dba8f4 Builtins_JSEntry [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
29: 0x1044f6fbc v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
30: 0x1044f6918 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/drew/.local/share/mise/installs/node/22.17.1/bin/node]
31: 0x1043a5f04 v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
32: 0x104194050 node::builtins::BuiltinLoader::CompileAndCall(v8::Local<v8::Context>, char const*, node::Realm*) [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
33: 0x10424cd14 node::Realm::ExecuteBootstrapper(char const*) [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
34: 0x104171db0 node::StartExecution(node::Environment*, char const*) [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
35: 0x104171d04 node::StartExecution(node::Environment*, std::__1::function<v8::MaybeLocal<v8::Value> (node::StartExecutionCallbackInfo const&)>) [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
36: 0x1040be3e0 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/drew/.local/share/mise/installs/node/22.17.1/bin/node]
37: 0x104204e10 node::NodeMainInstance::Run() [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
38: 0x104175008 node::Start(int, char**) [/Users/drew/.local/share/mise/installs/node/22.17.1/bin/node]
39: 0x19a7bab98 start [/usr/lib/dyld]
----- JavaScript stack trace -----
1: /Users/drew/.npm/_npx/08d118f851f764be/node_modules/esm/esm.js:1:34535
2: /Users/drew/.npm/_npx/08d118f851f764be/node_modules/esm/esm.js:1:34176
3: /Users/drew/.npm/_npx/08d118f851f764be/node_modules/esm/esm.js:1:34506
4: /Users/drew/.npm/_npx/08d118f851f764be/node_modules/esm/esm.js:1:173374
5: /Users/drew/.npm/_npx/08d118f851f764be/node_modules/esm/esm.js:1:173420
6: /Users/drew/.npm/_npx/08d118f851f764be/node_modules/esm/esm.js:1:173521
7: /Users/drew/.npm/_npx/08d118f851f764be/node_modules/esm/esm.js:1:258942
8: /Users/drew/.npm/_npx/08d118f851f764be/node_modules/esm/esm.js:1:261569
9: e (/Users/drew/.npm/_npx/08d118f851f764be/node_modules/esm/esm.js:1:262673)
10: get (/Users/drew/.npm/_npx/08d118f851f764be/node_modules/esm/esm.js:1:262740)
fish: Job 1, 'npx pactum-init' terminated by signal SIGABRT (Abort)
I also have these packages installed globally on every node
runtime I have installed (v22, v20, and v18):
❯ npm list -g
/Users/drew/.local/share/mise/installs/node/22.17.1/lib
├── @microsoft/[email protected]
├── @nestjs/[email protected]
├── @olrtg/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]