Closed Z-Machine closed 3 years ago
Following the setup guide but fresh template fails to build
PS D:\war3Projects\war3test> ls PS D:\war3Projects\war3test> git clone https://github.com/cipherxof/wc3-ts-template.git . Cloning into '.'... remote: Enumerating objects: 210, done. remote: Counting objects: 100% (210/210), done. remote: Total 210 (delta 101), reused 149 (delta 53), pack-reused 0 Receiving objects: 100% (210/210), 1.99 MiB | 1.12 MiB/s, done. Resolving deltas: 100% (101/101), done. PS D:\war3Projects\war3test> npm -v 7.16.0 PS D:\war3Projects\war3test> node -v v14.17.0 PS D:\war3Projects\war3test> npm install npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. > wc3-ts-template@1.0.0 postinstall > tsc --outDir null -p node_modules/mdx-m3-viewer/tsconfig.json added 304 packages, and audited 305 packages in 17s 2 packages are looking for funding run `npm fund` for details 4 moderate severity vulnerabilities To address all issues (including breaking changes), run: npm audit fix --force Run `npm audit` for details. PS D:\war3Projects\war3test> npm run test > wc3-ts-template@1.0.0 test > ts-node --transpile-only scripts/test.ts [2021-06-10 01:33:28] info: Transpiling TypeScript to Lua... D:\war3Projects\war3test\node_modules\typescript\lib\typescript.js:110412 throw e; ^ TypeError: tag.text.split is not a function at collectAnnotations (D:\war3Projects\war3test\node_modules\typescript-to-lua\dist\transformation\utils\annotations.js:31:75) at getTypeAnnotations (D:\war3Projects\war3test\node_modules\typescript-to-lua\dist\transformation\utils\annotations.js:46:9) at Object.isForRangeType (D:\war3Projects\war3test\node_modules\typescript-to-lua\dist\transformation\utils\annotations.js:158:12) at Object.transformIdentifier (D:\war3Projects\war3test\node_modules\typescript-to-lua\dist\transformation\visitors\identifier.js:19:23) at transformParameters (D:\war3Projects\war3test\node_modules\typescript-to-lua\dist\transformation\visitors\function.js:106:28) at Object.transformFunctionToExpression (D:\war3Projects\war3test\node_modules\typescript-to-lua\dist\transformation\visitors\function.js:142:57) at Object.transformMethodDeclaration (D:\war3Projects\war3test\node_modules\typescript-to-lua\dist\transformation\visitors\class\members\method.js:30:45) at transformClassLikeDeclaration (D:\war3Projects\war3test\node_modules\typescript-to-lua\dist\transformation\visitors\class\index.js:195:40) at Object.exports.transformClassDeclaration [as transform] (D:\war3Projects\war3test\node_modules\typescript-to-lua\dist\transformation\visitors\class\index.js:31:28) at TransformationContext.transformNode (D:\war3Projects\war3test\node_modules\typescript-to-lua\dist\transformation\context\context.js:45:62) Error: Command failed: tstl -p tsconfig.json at checkExecSyncError (child_process.js:640:11) at Object.execSync (child_process.js:676:15) at Object.compileMap (D:\war3Projects\war3test\scripts\utils.ts:108:3) at main (D:\war3Projects\war3test\scripts\test.ts:6:18) at Object.<anonymous> (D:\war3Projects\war3test\scripts\test.ts:31:1) at Module._compile (internal/modules/cjs/loader.js:1068:30) at Module.m._compile (D:\war3Projects\war3test\node_modules\ts-node\src\index.ts:858:23) at Module._extensions..js (internal/modules/cjs/loader.js:1097:10) at Object.require.extensions.<computed> [as .ts] (D:\war3Projects\war3test\node_modules\ts-node\src\index.ts:861:12) at Module.load (internal/modules/cjs/loader.js:933:32) PS D:\war3Projects\war3test>
Reverting typescript back to 4.2.3 solved the issue.
Fixed.
https://github.com/cipherxof/wc3-ts-template/commit/803c263adbeb766e2d9d5e80515e42828e2847c9
Following the setup guide but fresh template fails to build