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

Replace export let with export var #44

Merged
merged 1 commit into from
Feb 3, 2017
Merged

Conversation

arsenerei
Copy link
Contributor

When running through the (require '[js.hello :as hello] :reload) example, I got an error message from Node:

SyntaxError: Identifier 'sayHello$$module$src$js$hello' has already been declared
at /home/rei/repos/hello-es6/.cljs_node_repl/src/js/hello.js:1:1
at ContextifyScript.Script.runInThisContext (vm.js:26:33)
at Object.exports.runInThisContext (vm.js:79:17)
at nodeGlobalRequire (repl:85:6)
at global.CLOSURE_IMPORT_SCRIPT (repl:75:3)
at Object.goog.require (repl:21:8)
at repl:1:6
at ContextifyScript.Script.runInThisContext (vm.js:26:33)
at Object.exports.runInThisContext (vm.js:79:17)
at Domain. ([stdin]:50:34)

This was due to the fact that Node (my version is 7.4.0) disallows redefinining anything declared with a let. Cf: nodejs/node#6118, nodejs/node#8441

This commit replace any export let with an export var which can be refined without error.

When running through the `(require ... :reload)` example, I got an error message from Node:

SyntaxError: Identifier 'sayHello$$module$src$js$hello' has already been declared
    at /home/rei/repos/hello-es6/.cljs_node_repl/src/js/hello.js:1:1
    at ContextifyScript.Script.runInThisContext (vm.js:26:33)
    at Object.exports.runInThisContext (vm.js:79:17)
    at nodeGlobalRequire (repl:85:6)
    at global.CLOSURE_IMPORT_SCRIPT (repl:75:3)
    at Object.goog.require (repl:21:8)
    at repl:1:6
    at ContextifyScript.Script.runInThisContext (vm.js:26:33)
    at Object.exports.runInThisContext (vm.js:79:17)
    at Domain.<anonymous> ([stdin]:50:34)

This was due to the fact that Node (my version is 7.4.0) disallows redefinining anything declared with a `let`.  Cf: nodejs/node#6118

This commit replace any `export let` with an `export var` which can be refined without error.
@swannodette
Copy link
Member

Thanks.

@swannodette swannodette merged commit 7417f29 into clojure:master Feb 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants