Experience-Monks / Experience-Monks/google-maps-api

can't load google-maps-api

Open
#7 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
33
Forks
10
PR merge metrics
No merged PRs in 30d

Description

i have just follow the example section
var mapsapi = require( 'google-maps-api' )( 'api key' );

mapsapi().then( function( maps ) {

//use the google.maps object as you please
});

then

npm install google-maps-api
I got following error

E:\temp\map1\node_modules\google-maps-api\node_modules\scriptjs\dist\script.js:1
2
var doc = document
^

ReferenceError: document is not defined
at E:\temp\map1\node_modules\google-maps-api\node_modules\scriptjs\dist\scri
pt.js:12:13
at doc (E:\temp\map1\node_modules\google-maps-api\node_modules\scriptjs\dist
\script.js:8:72)
at Object. (E:\temp\map1\node_modules\google-maps-api\node_module
s\scriptjs\dist\script.js:11:3)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (E:\temp\map1\node_modules\google-maps-api\index.js:3:
14)

can you please help ?

Contributor guide

Open the contributing guide

Research direction

Read index.js and node_modules/scriptjs/dist/script.js, then reproduce the example in the reported Node environment. Determine the supported runtime and expected behavior when document is unavailable; done when the runtime requirement and resulting behavior are clearly documented or covered by a test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.