阅读 132

npm cb.apply is not a function

报错 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 

dist-tags:
csp: 1.0.28-csp  latest: 2.6.12   next: 3.0.11

published 7 months ago by yyx990803 

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>

 

原文:https://www.cnblogs.com/shaozhiqi/p/14643803.html

文章分类
代码人生
版权声明:本站是系统测试站点,无实际运营。本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 XXXXXXo@163.com 举报,一经查实,本站将立刻删除。
相关推荐