shlomiassaf / angular-library-starter

Your last library starter. A complete, @angular grade, library starter
MIT License
44 stars 12 forks source link

npm run lib:build results in "TSError: ⨯ Unable to compile TypeScript" after git clone and npm install #26

Open mikehutter opened 6 years ago

mikehutter commented 6 years ago

I simply followed the instructions provided:

git clone --depth 1 https://github.com/shlomiassaf/angular-library-starter.git cd angular-library-starter npm install -g node-pre-gyp npm install

and then running "npm run lib:build" produces the following error:

>angular-library-starter@1.0.0 lib:build C:_TMP\dcip-ng\angular-library-starter >gulp build C:_TMP\angular-library-starter\node_modules\ts-node\src\index.ts:307 throw new TSError(formatDiagnostics(diagnosticList, cwd, ts, lineOffset)) ^ TSError: ⨯ Unable to compile TypeScript Cannot find type definition file for 'source-map'. (2688) scripts\gulp\build.ts (30,27): Argument of type 'string[]' is not assignable to parameter of type 'string'. (2345) at getOutput (C:_TMP\angular-library-starter\node_modules\ts-node\src\index.ts:307:15)

mikehutter commented 6 years ago

update: as the error states, there were no definitions file for the source-map so I manually added them to my typings.d.ts file and then I also had to change the version of ngc-webpack from ^4.1.0 to 4.1.1 in package.json, only after I made those two changes was I able to run lib:build.

collink commented 6 years ago

@mikehutter can you elaborate on adding the definitions for source-map?