You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No interpolation of template string when thrown #13402
But after adding an npm script for it and running that, I get
$ npm run throwaway
>$REPO@$VERSION throwaway $HOME/Projects/$REPO> node ./test.js
$HOME/Projects/$REPO/test.js:2
throw `${foo}baz`
^
barbaz
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR!$REPO@$VERSION throwaway: `node ./test.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the $REPO@$VERSION throwaway script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!$HOME/.npm/_logs/2017-06-06T09_39_00_354Z-debug.log
So it could be, that it outputted me a raw view of the file's content … In that case, sorry for the noise :)
Activity
Fishrock123 commentedon Jun 2, 2017
Hmm, strange, it works for me in the repl:
cjihrig commentedon Jun 2, 2017
I can't reproduce on macOS with 8.0.0 or master.
vsemozhetbyt commentedon Jun 2, 2017
@Ryuno-Ki Can you provide the full literal output with the thrown error?
jasnell commentedon Jun 2, 2017
Also unable to reproduce.
bnoordhuis commentedon Jun 3, 2017
@Ryuno-Ki Are you using source code processors / transpilers like babel?
Ryuno-Ki commentedon Jun 6, 2017
Ah, maybe it is not a bug, but a feature …
But after adding an npm script for it and running that, I get
So it could be, that it outputted me a raw view of the file's content … In that case, sorry for the noise :)
refack commentedon Jun 6, 2017
@Ryuno-Ki thank you for the clarification and follow up.