frida / frida-compile

Compile a Frida script comprised of one or more Node.js modules
Other
190 stars 48 forks source link

"unable to resolve: {path}" when importing a module from upper directory #59

Open mooko-dev opened 2 years ago

mooko-dev commented 2 years ago

Hello.

Importing a module from upper directory (depth of the upper directory doesn't matter) causes "unable to resolve" error. Example: import * as test from '../test.js'

How to reproduce

mkdir frida_compile_test
mkdir frida_compile_test/subdir
echo "" > frida_compile_test/test.js
echo "import * as test from '../test.js'" > frida_compile_test/subdir/test2.js
frida-compile frida_compile_test/subdir/test2.js -o bundle.js

On my machine outputs: unable to resolve: $(pwd)/frida_compile_test/test.js

zhanghecn commented 1 year ago

Me, too, but I found a lower version that would fix it "frida-compile": "^10.2.5"

christiancoleman commented 1 year ago

@zhanghecn holy shit. I can't believe that worked for me. You are a life saver.