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
there's in a situation, npm bin print some warning msg such as:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. // stderr
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. // stderr
C:\Users\john\AppData\Roaming\npm //stdout
but your source code:
exec("npm bin -g",function(err,stdout,stderr){letdir=null;if(err||stderr||!stdout||stdout.length===0){// npm bin successfully print npm bin path with some warnings, but program goes to this branch.letenv=process.env;if(env&&env.npm_config_prefix){dir=path.join(env.npm_config_prefix,"bin");}}else{dir=stdout.trim();}console.log(dir)});
The text was updated successfully, but these errors were encountered:
there's in a situation,
npm bin
print some warning msg such as:but your source code:
The text was updated successfully, but these errors were encountered: