Closed ExternalAddress4401 closed 1 year ago
use esbuild it is much faster and works fine.
https://esbuild.github.io/getting-started/#install-esbuild
installing: npm install --save-exact esbuild
build (you can put this into package.json): .\node_modules\.bin\esbuild index.ts --bundle --outfile=script.js
i hope this helps you
I recently moved to ESM modules and you are using a very outdated version of frida-compile
- the latest one is 16.1.8
.
Also, the tsconfig.json
should be:
{
"compilerOptions": {
"target": "esnext",
"lib": [
"es2020"
],
"experimentalDecorators": true,
"module": "esnext",
"allowJs": false,
"noEmit": false,
"esModuleInterop": false,
"moduleResolution": "nodenext",
"strict": true,
"sourceMap": true
},
"files": [
"agent/index.ts"
]
}
The outdated frida-compile
is intentional as per https://github.com/frida/frida-compile/issues/59. The tsconfig on its own doesn't solve the issue.
esbuild looks to compile it, I haven't tested if it works but I'm not uglifyingthe entire project structure just to fix an old Frida bug so I'll see how it goes.
I see the issue mentioned at https://github.com/vfsfitvnm/frida-il2cpp-bridge/issues/273#issuecomment-1490589492 but the StackOverflow thread does not solve the issue.
Empty
node_modules
andpackage-lock.json
deleted.npm install https://github.com/vfsfitvnm/frida-il2cpp-bridge
The folder
node_modules/frida-il2cpp-bridge
does indeed exist with the expected contents.Start the project with for example
frida-compile test/index.ts -o script.js -w
Compilation failed: Error: Can't walk dependency graph: Cannot find module 'frida-il2cpp-bridge' from '...'
The
pack
instructions produce the same message. The package is 100% referenced correctly because an error is produced if the path is incorrect.Here's a very simple repo to replicate this: https://github.com/ExternalAddress4401/broken
npm install
npm run test
Produces the error.