Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSError: ⨯ Unable to compile TypeScript: #22

Open
BaseMax opened this issue Dec 29, 2022 · 1 comment
Open

TSError: ⨯ Unable to compile TypeScript: #22

BaseMax opened this issue Dec 29, 2022 · 1 comment

Comments

@BaseMax
Copy link

BaseMax commented Dec 29, 2022

npm start -- -i "C:\Users\Max\Documents\xxxxxxxxxx\resources\assets" -o "C:\Users\Max\Documents\xxxxxxxxxx\resources\assets\output"

up to date, audited 780 packages in 4s

96 packages are looking for funding
  run `npm fund` for details

2 high severity vulnerabilities

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
C:\Users\Max\react-native-decompiler\node_modules\ts-node\src\index.ts:750
    return new TSError(diagnosticText, diagnosticCodes);
           ^
TSError: ⨯ Unable to compile TypeScript:
src/main.ts:46:35 - error TS2558: Expected 0 type arguments, but got 1.

46 const argValues = commandLineArgs<CmdArgs>([
                                     ~~~~~~~
src/main.ts:98:50 - error TS2345: Argument of type 'CommandLineOptions' is not assignable to parameter of type 'CmdArgs'.
  Type 'CommandLineOptions' is missing the following properties from type 'CmdArgs': in, out, bundlesFolder, entry, and 10 more.

98     const modules = await fileParserRouter.route(argValues);
                                                    ~~~~~~~~~
src/main.ts:156:93 - error TS2345: Argument of type 'CommandLineOptions' is not assignable to parameter of type 'CmdArgs'.

156       const taggerRouters = nonIgnoredModules.map((m) => new Router(taggerList, m, modules, argValues));
                                                                                                ~~~~~~~~~
src/main.ts:178:50 - error TS2345: Argument of type 'CommandLineOptions' is not assignable to parameter of type 'CmdArgs'.

178       modulesToIgnore = calculateModulesToIgnore(argValues, modules);
                                                     ~~~~~~~~~
src/main.ts:183:52 - error TS2345: Argument of type 'CommandLineOptions' is not assignable to parameter of type 'CmdArgs'.

183         modulesToIgnore = calculateModulesToIgnore(argValues, modules);
                                                       ~~~~~~~~~
src/main.ts:219:93 - error TS2345: Argument of type 'CommandLineOptions' is not assignable to parameter of type 'CmdArgs'.

219       const editorRouters = nonIgnoredModules.map((m) => new Router(editorList, m, modules, argValues));
                                                                                                ~~~~~~~~~
src/main.ts:224:100 - error TS2345: Argument of type 'CommandLineOptions' is not assignable to parameter of type 'CmdArgs'.

224       const decompilerRouter = nonIgnoredModules.map((m) => new Router(decompilerList, m, modules, argValues));
                                                                                                       ~~~~~~~~~
src/main.ts:305:28 - error TS2345: Argument of type 'CommandLineOptions' is not assignable to parameter of type 'CmdArgs'.

305       await new CacheParse(argValues).writeCache(cacheFileName, modules);
                               ~~~~~~~~~

    at createTSError (C:\Users\Max\react-native-decompiler\node_modules\ts-node\src\index.ts:750:12)
    at reportTSError (C:\Users\Max\react-native-decompiler\node_modules\ts-node\src\index.ts:754:19)
    at getOutput (C:\Users\Max\react-native-decompiler\node_modules\ts-node\src\index.ts:941:36)
    at Object.compile (C:\Users\Max\react-native-decompiler\node_modules\ts-node\src\index.ts:1243:30)
    at Module.m._compile (C:\Users\Max\react-native-decompiler\node_modules\ts-node\src\index.ts:1370:30)
    at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Object.require.extensions.<computed> [as .ts] (C:\Users\Max\react-native-decompiler\node_modules\ts-node\src\index.ts:1374:12)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
  diagnosticText: '\x1B[96msrc/main.ts\x1B[0m:\x1B[93m46\x1B[0m:\x1B[93m35\x1B[0m - \x1B[91merror\x1B[0m\x1B[90m TS2558: \x1B[0mExpected 0 type arguments, but got 1.\r\n' +
    '\r\n' +
    '\x1B[7m46\x1B[0m const argValues = commandLineArgs<CmdArgs>([\r\n' +
    '\x1B[7m  \x1B[0m \x1B[91m                                  ~~~~~~~\x1B[0m\r\n' +
    "\x1B[96msrc/main.ts\x1B[0m:\x1B[93m98\x1B[0m:\x1B[93m50\x1B[0m - \x1B[91merror\x1B[0m\x1B[90m TS2345: \x1B[0mArgument of type 'CommandLineOptions' is not assignable to parameter of type 'CmdArgs'.\r\n" +
    "  Type 'CommandLineOptions' is missing the following properties from type 'CmdArgs': in, out, bundlesFolder, entry, and 10 more.\r\n" +
    '\r\n' +
    '\x1B[7m98\x1B[0m     const modules = await fileParserRouter.route(argValues);\r\n' +
    '\x1B[7m  \x1B[0m \x1B[91m                                                 ~~~~~~~~~\x1B[0m\r\n' +
    "\x1B[96msrc/main.ts\x1B[0m:\x1B[93m156\x1B[0m:\x1B[93m93\x1B[0m - \x1B[91merror\x1B[0m\x1B[90m TS2345: \x1B[0mArgument of type 'CommandLineOptions' is not assignable to parameter of type 'CmdArgs'.\r\n" +
    '\r\n' +
    '\x1B[7m156\x1B[0m       const taggerRouters = nonIgnoredModules.map((m) => new Router(taggerList, m, modules, argValues));\r\n' +
    '\x1B[7m   \x1B[0m \x1B[91m                                                                                            ~~~~~~~~~\x1B[0m\r\n' +
    "\x1B[96msrc/main.ts\x1B[0m:\x1B[93m178\x1B[0m:\x1B[93m50\x1B[0m - \x1B[91merror\x1B[0m\x1B[90m TS2345: \x1B[0mArgument of type 'CommandLineOptions' is not assignable to parameter of type 'CmdArgs'.\r\n" +
    '\r\n' +
    '\x1B[7m178\x1B[0m       modulesToIgnore = calculateModulesToIgnore(argValues, modules);\r\n' +
    '\x1B[7m   \x1B[0m \x1B[91m                                                 ~~~~~~~~~\x1B[0m\r\n' +
    "\x1B[96msrc/main.ts\x1B[0m:\x1B[93m183\x1B[0m:\x1B[93m52\x1B[0m - \x1B[91merror\x1B[0m\x1B[90m TS2345: \x1B[0mArgument of type 'CommandLineOptions' is not assignable to parameter of type 'CmdArgs'.\r\n" +
    '\r\n' +
    '\x1B[7m183\x1B[0m         modulesToIgnore = calculateModulesToIgnore(argValues, modules);\r\n' +
    '\x1B[7m   \x1B[0m \x1B[91m                                                   ~~~~~~~~~\x1B[0m\r\n' +
    "\x1B[96msrc/main.ts\x1B[0m:\x1B[93m219\x1B[0m:\x1B[93m93\x1B[0m - \x1B[91merror\x1B[0m\x1B[90m TS2345: \x1B[0mArgument of type 'CommandLineOptions' is not assignable to parameter of type 'CmdArgs'.\r\n" +
    '\r\n' +
    '\x1B[7m219\x1B[0m       const editorRouters = nonIgnoredModules.map((m) => new Router(editorList, m, modules, argValues));\r\n' +
    '\x1B[7m   \x1B[0m \x1B[91m                                                                                            ~~~~~~~~~\x1B[0m\r\n' +
    "\x1B[96msrc/main.ts\x1B[0m:\x1B[93m224\x1B[0m:\x1B[93m100\x1B[0m - \x1B[91merror\x1B[0m\x1B[90m TS2345: \x1B[0mArgument of type 'CommandLineOptions' is not assignable to parameter of type 'CmdArgs'.\r\n" +
    '\r\n' +
    '\x1B[7m224\x1B[0m       const decompilerRouter = nonIgnoredModules.map((m) => new Router(decompilerList, m, modules, argValues));\r\n' +
    '\x1B[7m   \x1B[0m \x1B[91m                                                                                                   ~~~~~~~~~\x1B[0m\r\n' +
    "\x1B[96msrc/main.ts\x1B[0m:\x1B[93m305\x1B[0m:\x1B[93m28\x1B[0m - \x1B[91merror\x1B[0m\x1B[90m TS2345: \x1B[0mArgument of type 'CommandLineOptions' is not assignable to parameter of type 'CmdArgs'.\r\n" +
    '\r\n' +
    '\x1B[7m305\x1B[0m       await new CacheParse(argValues).writeCache(cacheFileName, modules);\r\n' +
    '\x1B[7m   \x1B[0m \x1B[91m                           ~~~~~~~~~\x1B[0m\r\n',
  diagnosticCodes: [
    2558, 2345, 2345,
    2345, 2345, 2345,
    2345, 2345
  ]
}
@Happ1ness-dev
Copy link

Same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants