frida-compile seems to be urlencoding its path which causes compilation errors as shown:
> frida-compile -o _index.js index.ts
Cannot find global type 'Array'.
Cannot find global type 'Boolean'.
Cannot find global type 'CallableFunction'.
Cannot find global type 'Function'.
Cannot find global type 'IArguments'.
Cannot find global type 'NewableFunction'.
Cannot find global type 'Number'.
Cannot find global type 'Object'.
Cannot find global type 'RegExp'.
Cannot find global type 'String'.
File 'D:/frida%20test%20app/node_modules/frida-compile/ext/lib.es2020.d.ts' not found.
The file is in the program because:
Library 'lib.es2020.d.ts' specified in compilerOptions
D:/frida test app/index.ts (8,5): Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'.
D:/frida test app/node_modules/@types/frida-gum/index.d.ts (209,50): Cannot find name 'Promise'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
D:/frida test app/node_modules/@types/frida-gum/index.d.ts (629,8): Cannot find name 'Promise'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
D:/frida test app/node_modules/@types/frida-gum/index.d.ts (1255,27): Cannot find name 'Record'.
D:/frida test app/node_modules/@types/frida-gum/index.d.ts (1641,25): Cannot find name 'Extract'.
D:/frida test app/node_modules/@types/frida-gum/index.d.ts (1664,25): Cannot find name 'Extract'.
D:/frida test app/node_modules/@types/frida-gum/index.d.ts (1698,13): Cannot find name 'Extract'.
D:/frida test app/node_modules/@types/frida-gum/index.d.ts (1727,89): Cannot find name 'Array'.
D:/frida test app/node_modules/@types/frida-gum/index.d.ts (1727,95): Type '0' cannot be used to index type 'Tail'.
D:/frida test app/node_modules/@types/frida-gum/index.d.ts (1731,6): Type alias 'RecursiveValuesOf' circularly references itself.
D:/frida test app/node_modules/@types/frida-gum/index.d.ts (1731,42): Cannot find name 'Array'.
As you can see, the cause of the errors appears to be this line:
File 'D:/frida%20test%20app/node_modules/frida-compile/ext/lib.es2020.d.ts' not found.
The file is in the program because:
Library 'lib.es2020.d.ts' specified in compilerOptions
Where Frida is urlencoding the path...
Running on Windows, I'm not sure if this happens on other platforms
frida-compile
seems to be urlencoding its path which causes compilation errors as shown:As you can see, the cause of the errors appears to be this line:
Where Frida is urlencoding the path...
Running on Windows, I'm not sure if this happens on other platforms