| Doesn't look like a bug, just a problem with pipeline syntax. Note that $ in pipeline (groovy) is used for expanding groovy variables, so "${npm bin}" is not valid. You can either of the following instead: sh "echo \$(npm bin)" sh 'echo $(npm bin)' (these call echo command in your shell and hence $ is interpreted by shell). |