无法全局安装Ionic:npm报E404找不到@ionic/cli-framework@0.1.3
Let's walk through resolving this installation error step by step. First, here's the error you ran into for context:
npm ERR! code E404 npm ERR! 404 Not Found: @ionic/cli-framework@0.1.3
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\User\AppData\Roaming\npm-cache_logs\2018-05-10T07_52_51_175Z-debug.log
This issue happens because the older version of Ionic CLI that npm install -g ionic tries to pull in depends on @ionic/cli-framework@0.1.3—a package version that's no longer available in the npm registry. Here's how to fix it:
Uninstall any existing Ionic CLI (if present)
Old, leftover CLI versions can cause conflicts. Remove them first with:npm uninstall -g ionicClear your npm cache
Outdated cached package metadata might be tricking npm into looking for the missing version. Clear it with:npm cache clean --forceInstall the latest official Ionic CLI package
The modern, maintained Ionic CLI is now published under the@ionic/cliscope. Install it globally with:npm install -g @ionic/cliOptional: Update your npm version
If you still hit snags, an outdated npm could be part of the problem. Update npm first:npm install -g npm
Once you've completed these steps, run ionic --version to confirm the CLI installed successfully.
内容的提问来源于stack exchange,提问作者zaw naing

