The default editor of npm config is vi. After read this docs: https://docs.npmjs.com/misc/config#editor
☁ nodejs-project npm get editor
vi
Now, I want to edit npm config using visual-studio-code
So, I set npm editor to visual-studio-code like this:
☁ nodejs-project npm set editor visual-studio-code
☁ nodejs-project npm get editor
visual-studio-code
And, try this command, got an error:
☁ nodejs-project npm config edit
npm ERR! path visual-studio-code
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn visual-studio-code
npm ERR! enoent spawn visual-studio-code ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ldu020/.npm/_logs/2019-01-18T03_00_59_872Z-debug.log