报错 cb.apply is not a function
然后就删除了手动删除了C:\Users\zhiqi.shao\AppData\Roaming\下的npm 和npm-cache(删除时关闭占用,如cmd)
然后执行:
C:\Users\zhiqi.shao>node -v v14.16.0 C:\Users\zhiqi.shao>npm -v 6.14.11 C:\Users\zhiqi.shao>npm list -global C:\Users\zhiqi.shao\AppData\Roaming\npm `-- (empty) C:\Users\zhiqi.shao>npm config set registry=http://registry.npm.taobao.org C:\Users\zhiqi.shao>npm config list ; cli configs metrics-registry = "http://registry.npm.taobao.org/" scope = "" user-agent = "npm/6.14.11 node/v14.16.0 win32 x64" ; userconfig C:\Users\zhiqi.shao\.npmrc registry = "http://registry.npm.taobao.org/" ; builtin config undefined prefix = "C:\\Users\\zhiqi.shao\\AppData\\Roaming\\npm" ; node bin location = D:\Program Files\nodejs\node.exe ; cwd = C:\Users\zhiqi.shao ; HOME = C:\Users\zhiqi.shao ; "npm config ls -l" to show all defaults. C:\Users\zhiqi.shao>npm config get registry http://registry.npm.taobao.org/ C:\Users\zhiqi.shao>npm info vue vue@2.6.12 | MIT | deps: none | versions: 315 Reactive, component-oriented view layer for modern web interfaces. https://github.com/vuejs/vue#readme dist .tarball: https://registry.npm.taobao.org/vue/download/vue-2.6.12.tgz .shasum: f5ebd4fa6bd2869403e29a896aed4904456c9123 maintainers: - yyx990803 <yyx990803@gmail.com> dist-tags: csp: 1.0.28-csp latest: 2.6.12 next: 3.0.11 published 7 months ago by yyx990803 <yyx990803@gmail.com> C:\Users\zhiqi.shao>npm install npm -g C:\Users\zhiqi.shao\AppData\Roaming\npm\npm -> C:\Users\zhiqi.shao\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js C:\Users\zhiqi.shao\AppData\Roaming\npm\npx -> C:\Users\zhiqi.shao\AppData\Roaming\npm\node_modules\npm\bin\npx-cli.js + npm@7.9.0 added 252 packages from 909 contributors in 42.606s
测试安装最新版本vue
C:\Users\zhiqi.shao>npm install -g vue-cli@2.9.6 npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen) npm WARN deprecated vue-cli@2.9.6: This package has been deprecated in favour of @vue/cli added 236 packages in 54s C:\Users\zhiqi.shao>