screepers / screeps-typescript-starter

Starter kit for TypeScript-based Screeps AI codes.
https://screepers.gitbook.io/screeps-typescript-starter/
The Unlicense
441 stars 318 forks source link

[SOLVED] Unable to Build #94

Closed CanisHelix closed 6 years ago

CanisHelix commented 6 years ago

I'm running this on Ubuntu WSL but I'm having trouble building it. I guess my package.lock got generated differently perhaps.

When I run build I get the following error

> screeps-typescript-starter@3.0.0 build /mnt/w/Projects/Games/Screeps
> rollup -c

No destination specified - code will be compiled but not uploaded

src/main.ts → dist/main.js...
[!] (rpt2 plugin) Error: /mnt/w/Projects/Games/Screeps/src/utils/ErrorMapper.ts(10,7): semantic error TS2322 Type 'Promise<BasicSourceMapConsumer>' is not assignable to type 'SourceMapConsumer'.
  Property 'computeColumnSpans' is missing in type 'Promise<BasicSourceMapConsumer>'.
src/utils/ErrorMapper.ts
Error: /mnt/w/Projects/Games/Screeps/src/utils/ErrorMapper.ts(10,7): semantic error TS2322 Type 'Promise<BasicSourceMapConsumer>' is not assignable to type 'SourceMapConsumer'.
  Property 'computeColumnSpans' is missing in type 'Promise<BasicSourceMapConsumer>'.
    at error (/mnt/w/Projects/Games/Screeps/node_modules/rollup/dist/rollup.js:3438:30)
    at Object.error (/mnt/w/Projects/Games/Screeps/node_modules/rollup/dist/rollup.js:21120:17)
    at RollupContext.error (/mnt/w/Projects/Games/Screeps/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:17167:30)
    at lodash_2 (/mnt/w/Projects/Games/Screeps/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:19879:23)
    at arrayEach (/mnt/w/Projects/Games/Screeps/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:516:11)
    at forEach (/mnt/w/Projects/Games/Screeps/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:9341:14)
    at printDiagnostics (/mnt/w/Projects/Games/Screeps/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:19852:5)
    at Object.transform (/mnt/w/Projects/Games/Screeps/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:20125:17)
    at /mnt/w/Projects/Games/Screeps/node_modules/rollup/dist/rollup.js:20831:25
    at <anonymous>

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! screeps-typescript-starter@3.0.0 build: `rollup -c`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the screeps-typescript-starter@3.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2018-08-25T16_06_48_017Z-debug.log

Any idea how to fix this at all? I've yet to make any changes to this at all.

CanisHelix commented 6 years ago

I will admit I am new to Typescript and this is my learning exercise.

I've tried Typescript 2.9.2 and I tried upgrading to 3.0.1, I've tried Rollup 0.63.4 and 0.65

CanisHelix commented 6 years ago

I accidentally updated source-map somehow, downgraded to 0.61 and it works.