nesh
nesh copied to clipboard
Combining babel and eval leads to a syntax error in eval
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.
I'm having the same issue. Any update on this?
Perhaps related to #44 that also fails to combine babel and eval?