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

Combining babel and eval leads to a syntax error in eval #41

Open
blazzy opened this issue Oct 20, 2015 · 2 comments
Open

Combining babel and eval leads to a syntax error in eval #41

blazzy opened this issue Oct 20, 2015 · 2 comments

Comments

@blazzy
Copy link

blazzy commented Oct 20, 2015

Eval works as expected when I attempt a simple console.log nesh -e 'console.log("hello world");'.

But if I introduce the babel flag nesh -b -e 'console.log("hello world");', the eval blows up with the following error:

Error in plugin eval:
SyntaxError: Unexpected identifier
    at Object.exports.runInThisContext (vm.js:53:16)
    at exports.postStart (/usr/local/Cellar/nvm/0.26.1/versions/node/v4.0.0/lib/node_modules/nesh/lib/plugins/eval.js:24:19)
    at callPluginMethod (/usr/local/Cellar/nvm/0.26.1/versions/node/v4.0.0/lib/node_modules/nesh/lib/nesh.js:73:9)
    at process (/usr/local/Cellar/nvm/0.26.1/versions/node/v4.0.0/lib/node_modules/nesh/lib/nesh.js:40:16)
    at /usr/local/Cellar/nvm/0.26.1/versions/node/v4.0.0/lib/node_modules/nesh/lib/nesh.js:52:18
    at callPluginMethod (/usr/local/Cellar/nvm/0.26.1/versions/node/v4.0.0/lib/node_modules/nesh/lib/nesh.js:78:14)
    at process (/usr/local/Cellar/nvm/0.26.1/versions/node/v4.0.0/lib/node_modules/nesh/lib/nesh.js:40:16)
    at process (/usr/local/Cellar/nvm/0.26.1/versions/node/v4.0.0/lib/node_modules/nesh/lib/nesh.js:55:16)
    at processPlugins (/usr/local/Cellar/nvm/0.26.1/versions/node/v4.0.0/lib/node_modules/nesh/lib/nesh.js:58:12)
    at /usr/local/Cellar/nvm/0.26.1/versions/node/v4.0.0/lib/node_modules/nesh/lib/nesh.js:105:14

Here is the version info on launch with the babel flag Babel 5.8.25 on Node v4.0.0.

And the output of nesh --version is nesh version 1.6.0. The latest version as of this post.

@bjrnt
Copy link

bjrnt commented Oct 28, 2015

I'm having the same issue. Any update on this?

@holyjak
Copy link

holyjak commented Nov 11, 2016

Perhaps related to #44 that also fails to combine babel and eval?

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

No branches or pull requests

3 participants