Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Missing URL" error when used in Node.JS #44

Closed
arv opened this issue Mar 28, 2013 · 1 comment
Closed

"Missing URL" error when used in Node.JS #44

arv opened this issue Mar 28, 2013 · 1 comment

Comments

@arv
Copy link
Collaborator

arv commented Mar 28, 2013

Original author: aikar%ai...@gtempaccount.com (September 19, 2011 12:31:03)

What steps will reproduce the problem?

  1. Checkout http://github.com/aikar/traceur which I wrote a loader to middleman module loads to run through traceur
  2. delete traceur folder and recheckout from SVN (I commented out the error in traceur/src/semantics/symbols/ModuleSymbol.js)
  3. run node test.js
  4. Witness "Missing URL". For bigger projects it spams alot more.

What is the expected output? What do you see instead?
No error

What version of the product are you using? On what operating system?
latest trunk as of 9/19/11

Please provide any additional information below.

NOTE: To get traceur to work with node.js I had to disable the FreeVariableChecker like so:
traceur.semantics.FreeVariableChecker.checkProgram = function() {}

This is due to Traceur blowing up saying module was not defined.

also, to assist debugging I threw in an exception to get a stack trace:

Error: Missing URL
at Object.ModuleSymbol (/home/aikar/projects/nodeib/node_modules/traceur/traceur/src/semantics/symbols/ModuleSymbol.js:36:13)
at Object.Project (/home/aikar/projects/nodeib/node_modules/traceur/traceur/src/semantics/symbols/Project.js:45:24)
at Object..js (/home/aikar/projects/nodeib/node_modules/traceur/traceur.js:34:19)
at Module.load (module.js:343:31)
at Function._load (module.js:302:12)
at require (module.js:355:19)
at Object.<anonymous> (/home/aikar/projects/nodeib/node_modules/traceur/test.js:2:7)
at Module._compile (module.js:411:26)
at Object.<anonymous> (module.js:417:10)
at Module.load (module.js:343:31)

Original issue: http://code.google.com/p/traceur-compiler/issues/detail?id=41

@arv
Copy link
Collaborator Author

arv commented Mar 28, 2013

From arv@chromium.org on November 11, 2011 07:19:21
A couple of notes.

Make sure you are passing in a url to the Project constructor:

var project = new traceur.semantics.symbols.Project(document.location.href);

Secondly, you can now set traceur.options.freeVariableChecker to false. You might also want to disable the validator to speed things up. See options.js for more info.

Do you still think there are things that need to change in traceur to better handle this?

@arv arv closed this as completed Mar 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant