angular2-apollo-client-webpack-starter
angular2-apollo-client-webpack-starter copied to clipboard
Lodash ambient setup errors
Great starter kit. Thanks!
I'd like to report that during npm start
I experienced these errors:
ERROR in /Users/gerardsans/Desktop/Projects/graphql/angular2-apollo-client-webpack-starter/typings/globals/ambient/index.d.ts
(4,25): error TS2307: Cannot find module 'lodash/index'.
ERROR in /Users/gerardsans/Desktop/Projects/graphql/angular2-apollo-client-webpack-starter/typings/globals/ambient/index.d.ts
(5,3): error TS2300: Duplicate identifier 'export='.
ERROR in /Users/gerardsans/Desktop/Projects/graphql/angular2-apollo-client-webpack-starter/ambient.d.ts
(5,25): error TS2307: Cannot find module 'lodash/index'.
ERROR in /Users/gerardsans/Desktop/Projects/graphql/angular2-apollo-client-webpack-starter/ambient.d.ts
(6,3): error TS2300: Duplicate identifier 'export='.
Did the app still start though? You might need to run npm install
if it didn't work.
Yes, it worked but I don't like having errors on my console.
Good news is I already found a fix! :smile:
You can run:
npm run typings install lodash --ambient
Then replace angular2-apollo-client-webpack-starter/ambient.d.ts
:
declare module 'lodash.has' {
import main = require('~lodash/index');
export = main.has;
}
with
declare module 'lodash.has' {
import main = require('lodash');
export = main.has;
}
I also had to comment out the same module declaration at angular2-apollo-client-webpack-starter/typings/globals/ambient/index.d.ts
Thanks for the update!
Same issues, never able to get it start. Really love the vision, but the boilerplates are making the on-ramp for this service a little hard to use.
What errors do you get after running the above commands to update the module declarations?
Great !