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

Multiline babel-node repl. #1741

Closed
piyushchauhan2011 opened this Issue Jun 13, 2015 · 15 comments

Comments

Projects
None yet
8 participants
@piyushchauhan2011

piyushchauhan2011 commented Jun 13, 2015

I noticed that node repl has multiline support while babel-node doesn't support multiline input.

@mikeybox

This comment has been minimized.

Show comment
Hide comment
@mikeybox

mikeybox Jun 22, 2015

@piyushchauhan2011 @sebmck Either this has been fixed or the issue isn't multiline support.
Tested on bable-node 5.6.3

mikeybox commented Jun 22, 2015

@piyushchauhan2011 @sebmck Either this has been fixed or the issue isn't multiline support.
Tested on bable-node 5.6.3

@ameyms

This comment has been minimized.

Show comment
Hide comment
@ameyms

ameyms Jun 24, 2015

@piyushchauhan2011 @sebmck Thats right. Doesn't seem to be a problem anymore.

ameyms commented Jun 24, 2015

@piyushchauhan2011 @sebmck Thats right. Doesn't seem to be a problem anymore.

@mwq27

This comment has been minimized.

Show comment
Hide comment
@mwq27

mwq27 Jun 25, 2015

How do you enter multiline mode in babel-node? it's still not working.

mwq27 commented Jun 25, 2015

How do you enter multiline mode in babel-node? it's still not working.

@kittens

This comment has been minimized.

Show comment
Hide comment
@kittens

kittens Jun 25, 2015

Member

It'd depend on your version of node or io.js. Can everyone who's tested it
please provide their version and whether it works or not?

On Thursday, 25 June 2015, Marques Woodson notifications@github.com wrote:

How do you enter multiline mode in babel-node? it's still not working.


Reply to this email directly or view it on GitHub
#1741 (comment).

Sebastian McKenzie

Member

kittens commented Jun 25, 2015

It'd depend on your version of node or io.js. Can everyone who's tested it
please provide their version and whether it works or not?

On Thursday, 25 June 2015, Marques Woodson notifications@github.com wrote:

How do you enter multiline mode in babel-node? it's still not working.


Reply to this email directly or view it on GitHub
#1741 (comment).

Sebastian McKenzie

@piyushchauhan2011

This comment has been minimized.

Show comment
Hide comment
@piyushchauhan2011

piyushchauhan2011 commented Jun 25, 2015

@mikeybox

This comment has been minimized.

Show comment
Hide comment
@mikeybox

mikeybox Jun 26, 2015

Ok updated to 0.12. and I'm getting the same error. @sebmck I can take a look at this if thats helpful.

mikeybox commented Jun 26, 2015

Ok updated to 0.12. and I'm getting the same error. @sebmck I can take a look at this if thats helpful.

@kittens

This comment has been minimized.

Show comment
Hide comment
@kittens

kittens Jun 26, 2015

Member

Sure, I think the REPL in 0.12 and iojs was changed to be "smarter" about multilines. Previously it'd consider any syntax errors to just mean multiline code. That's the only way to catch it for Babel though so that functionality may have to be replicated.

Member

kittens commented Jun 26, 2015

Sure, I think the REPL in 0.12 and iojs was changed to be "smarter" about multilines. Previously it'd consider any syntax errors to just mean multiline code. That's the only way to catch it for Babel though so that functionality may have to be replicated.

@mikeybox

This comment has been minimized.

Show comment
Hide comment
@mikeybox

mikeybox Jun 28, 2015

@sebmck It's a raised issue with node so I've submitted a pull request that will hopefully be accepted or they'll implement their own fix. In the mean time we can either take the forked REPL fix and add to Babel as a temp patch or wait and see. The REPL fix will require a minor tweak in babel node to pass a custom check function for recoverable errors.

mikeybox commented Jun 28, 2015

@sebmck It's a raised issue with node so I've submitted a pull request that will hopefully be accepted or they'll implement their own fix. In the mean time we can either take the forked REPL fix and add to Babel as a temp patch or wait and see. The REPL fix will require a minor tweak in babel node to pass a custom check function for recoverable errors.

@discotroll65

This comment has been minimized.

Show comment
Hide comment
@discotroll65

discotroll65 Jul 29, 2015

@mikeybox , any status on this? I guess as a work around we can just use node 0.11, before the REPL was made "smarter" ?

discotroll65 commented Jul 29, 2015

@mikeybox , any status on this? I guess as a work around we can just use node 0.11, before the REPL was made "smarter" ?

@discotroll65

This comment has been minimized.

Show comment
Hide comment
@discotroll65

discotroll65 Jul 29, 2015

Actually, using nvm just tried babel-node on v0.11.16 -- same bug is there too. v0.10.40 works though.

discotroll65 commented Jul 29, 2015

Actually, using nvm just tried babel-node on v0.11.16 -- same bug is there too. v0.10.40 works though.

@piyushchauhan2011

This comment has been minimized.

Show comment
Hide comment
@piyushchauhan2011

piyushchauhan2011 commented Jul 29, 2015

@lydell

This comment has been minimized.

Show comment
Hide comment
@lydell
Contributor

lydell commented Jul 29, 2015

@mikeybox

This comment has been minimized.

Show comment
Hide comment
@mikeybox

mikeybox Jul 29, 2015

@discotroll65 unfortunately I've not had any movement on the pull request I submitted to the Node.js guys so at the moment it's in limbo. @sebmck may have some thoughts on the matter but essentially it's Node's implementation of REPL that breaks the multiline support in third party libraries. At the moment if your code doesn't require a newer version of Node then yeah use that until there's a better solution.

mikeybox commented Jul 29, 2015

@discotroll65 unfortunately I've not had any movement on the pull request I submitted to the Node.js guys so at the moment it's in limbo. @sebmck may have some thoughts on the matter but essentially it's Node's implementation of REPL that breaks the multiline support in third party libraries. At the moment if your code doesn't require a newer version of Node then yeah use that until there's a better solution.

@kittens

This comment has been minimized.

Show comment
Hide comment
@kittens

kittens Oct 11, 2015

Member

Closing this as babel-node just uses the node API and whatever issues with it aren't the result of Babel.

Member

kittens commented Oct 11, 2015

Closing this as babel-node just uses the node API and whatever issues with it aren't the result of Babel.

@ajwhite

This comment has been minimized.

Show comment
Hide comment
@ajwhite

ajwhite Jun 8, 2017

Hrmm, @kittens I came across a difference in behavior between babel-node and node -- check it out:

example

ajwhite commented Jun 8, 2017

Hrmm, @kittens I came across a difference in behavior between babel-node and node -- check it out:

example

@lock lock bot added the outdated label May 4, 2018

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 2018

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