npm install -g @stoplight/spectral-cli Giving below error
npm WARN node-fetch@2.6.8 requires a peer of encoding@^0.1.0 but none was installed. npm ERR! Linux 5.4.0-1094-azure npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "@stoplight/spectral-cli" npm ERR! node v8.10.0 npm ERR! npm v3.5.2 npm ERR! path /usr/local/lib/node_modules/.staging/@types/node-76508090/package.json npm ERR! code ENOTDIR npm ERR! errno -20 npm ERR! syscall open
npm ERR! ENOTDIR: not a directory, open '/usr/local/lib/node_modules/.staging/@types/node-76508090/package.json' npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request: npm ERR! /azp/npm-debug.log npm ERR! code 1