Cannot file module 'google
See original GitHub issueIssue description Hi 😃
Im using this library with google places api. So I lazy load the js file:
this.places = new google.maps.places.Autocomplete(el.nativeElement.children[0], {
types: ['(cities)'],
componentRestrictions: { country: 'fr' }
});
The problem is that the typescript compiler is telling me Cannot find name 'google'
since it loads dynamically I guess i cannot use the /// <reference path="???" />
Any ideas?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
cannot find module 'google-module' - Stack Overflow
cannot find module 'google-module' · This is using an older google-cloud library version. · looks like npm was able to add the dependencies....
Read more >Error: Cannot find module 'google-cloud' · Issue #56 - GitHub
The dependencies were recently updated to latest which very likely fixes this. If the issue persists, feel free to reopen. All ...
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
Why the "Error: cannot find module" Occurs · you're trying to import an item from a module you don't have installed in your...
Read more >Failed to import the Cloud Firestore client library for Node.js ...
js. Make sure to install the "@google-cloud/firestore" npm package. Original error: Error: Cannot find module 'is-set'.
Read more >Error [ERR_MODULE_NOT_FOUND]: Cannot find module in JS
The "Error [ERR_MODULE_NOT_FOUND]: Cannot find module" occurs when you set the type attribute to module in your package.json file, but omit the file...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not working for me, Any snippet would be grate?
A bit late to the party, but in case someone ends up on this page… This worked for me:
npm install @types/googlemaps --save
Then in the component where I use the google name:
import { } from '@types/googlemaps';
I hope it helps.