Leaflet: ReferenceError: window is not defined

Created on 10 Feb 2015  路  1Comment  路  Source: Leaflet/Leaflet

I am facing issue "ReferenceError: window is not defined" using leaflet with nodeJs in as:

c:\Projects\Leaflet\node_modules\leafletdist\leaflet-src.js:9180
}(window, document));
^
ReferenceError: window is not defined
at Object. (c:\Projects\Leaflet\node_modules\leafletdist\leaflet-src.js:9180:3)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (c:\Projects\Leaflet\app.js:7:9)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)

>All comments

Leaflet is a client-side library; it's not usable in node.js.

Was this page helpful?
0 / 5 - 0 ratings