'Can not install vue-cli, no matching version found

I can not install vue-cli, it asks me to install specific express-serve-static package, however i could not install that package as well. How can i solve this issue?

When I am trying to install vue-cli,

sudo npm install -g @vue/cli

gives me the error:

npm ERR! code ETARGET
npm ERR! notarget No matching version found for @types/[email protected].
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget 
npm ERR! notarget It was specified as a dependency of 'apollo-server-express'
  • Then I just tried to install express-serve-static
$ npm install -g @types/express-serve-static-core
+ @types/[email protected]
updated 1 package in 4.536s
  • As you can see, npm did not install the 4.17.13, then i just change the command:
$ npm install -g @types/[email protected]
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @types/[email protected].
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

Node and npm version:

$ node -v
v14.15.1

$ which node
.../Desktop/node_and_npm/node-v14.15.1-darwin-x64/bin/node

$ npm -v
6.14.8

$ which npm
.../Desktop/node_and_npm/node-v14.15.1-darwin-x64/bin/npm


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source