Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Proper modules.exports missing? #1974

Closed
schniedan opened this Issue Oct 31, 2011 · 1 comment

Comments

Projects
None yet
2 participants

Hi there,

I want to use LeaftletJS (http://leaflet.cloudmade.com/) server-sided with nodejs. But node is always giving me a "L is not defined". Together with the developer of leaflet I figured out, it is an issue of exporting the root-L-object of leaflet as a module.
Find the related leaflet-issue here: https://github.com/CloudMade/Leaflet/issues/356

Do we miss something? What is required in this case of using an "root.L" to export this a module?

Calling "var L = require('./leafletjs/dist/leaflet.js');" immediately fails with this message:

$ node html5webclient/leafletnode.js
exporting L

node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
ReferenceError: L is not defined
at Object. (/cygdrive/c/path/to/leafletjs/dist/leaflet.js
:6:463)
at Module._compile (module.js:411:26)
at Object..js (module.js:417:10)
at Module.load (module.js:343:31)
at Function._load (module.js:302:12)
at require (module.js:355:19)
at Object. (/cygdrive/c/path/to/leafletnode.js:28:15)
at Module._compile (module.js:411:26)
at Object..js (module.js:417:10)
at Module.load (module.js:343:31)

Would be grateful for any hint or suggestions as this is getting a bit time-critical for my Bachelor-Thesis soon.

Many thanks in advance,
Andreas

isaacs commented Oct 31, 2011

This should be posted to the node user group list, or as an issue on the library you're using. The node issues list is strictly for bugs and feature suggestions related to node itself.

@isaacs isaacs closed this Oct 31, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment