angular-library-starter
angular-library-starter copied to clipboard
npm run lib:build results in "TSError: ⨯ Unable to compile TypeScript" after git clone and npm install
-
I'm submitting a ... [x ] bug report [ ] feature request [ ] question about the decisions made in the repository
-
What is the current behavior?
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:
>[email protected] 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)
- Please tell us about your environment:
- Windows 10
- Node 6.9.2
- NPM 3.10.9
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.
@mikehutter can you elaborate on adding the definitions for source-map
?