vsternbach / angularjs-typescript-webpack

AngularJS 1.7, typescript 3 and webpack 4 starter project based on angular tutorial
147 stars 41 forks source link

npm start fails because of error referencing gapi #2

Closed ttrentham closed 6 years ago

ttrentham commented 7 years ago

I get the following when I try to run npm start.

[at-loader] Checking finished with 1 errors Time: 3825ms Asset Size Chunks Chunk Names main.bundle.js 143 kB 0 [emitted] main vendor.bundle.js 2.14 MB 1 [emitted] vendor

ERROR in multi (webpack)-dev-server/client?http://localhost:3000 webpack/hot/dev-server angular/angular.js angular-ui-router/release/angular-ui-router.js angular-sanitize/angular-sanitize.js eventemitter3 material-design-lite/material.css material-design-lite/material.js Module not found: Error: Can't resolve 'material-design-lite/material.css' in '/Users/ttrentham/source/angularjs-typescript-webpack/src' @ multi (webpack)-dev-server/client?http://localhost:3000 webpack/hot/dev-server angular/angular.js angular-ui-router/release/angular-ui-router.js angular-sanitize/angular-sanitize.js eventemitter3 material-design-lite/material.css material-design-lite/material.js

ERROR in multi (webpack)-dev-server/client?http://localhost:3000 webpack/hot/dev-server angular/angular.js angular-ui-router/release/angular-ui-router.js angular-sanitize/angular-sanitize.js eventemitter3 material-design-lite/material.css material-design-lite/material.js Module not found: Error: Can't resolve 'material-design-lite/material.js' in '/Users/ttrentham/source/angularjs-typescript-webpack/src' @ multi (webpack)-dev-server/client?http://localhost:3000 webpack/hot/dev-server angular/angular.js angular-ui-router/release/angular-ui-router.js angular-sanitize/angular-sanitize.js eventemitter3 material-design-lite/material.css material-design-lite/material.js

ERROR in [at-loader] ./src/tasks.service.ts:111:12 TS2304: Cannot find name 'gapi'.

Does this need gapi in the package.json?

ttrentham commented 7 years ago

So doing the following allowed me to run the code without errors:

npm install --save @types/gapi
npm install --save material-design-lite
vsternbach commented 6 years ago

not relevant anymore, updated the project as angular tour of heroes example