当前位置: 首页 > news >正文

vue-cli从2升级到3报错error 404 Not Found: @wry/context@^0.4.0

vue3出来了,想尝尝鲜。

于是按官方的方法卸载2安装3.

npm uninstall vue-cli -g


npm install -g @vue/cli

但是报错了 error 404 Not Found: @wry/context@^0.4.0

 

一脸懵逼。。。

网上搜索之,并没有什么参考资,只得自己一步一步排除。

一,于是检查Node.js版本,推荐 8.11.0+

node -v

没有问题

 

二,删掉原来node全局配置的vue-cli并使用管理员的cmd

还是存在问题

 

解决办法: nrm的基本用法

原来我使用了nrm 管理 npm源的问题

设置了 npm 实际是指向了淘宝的

将源改为官方的

 

重新安装:

npm install -g @vue/cli
D:\>nrm use npm


   Registry has been set to: https://registry.npmjs.org/


D:\>npm install -g @vue/cli
npm WARN deprecated joi@14.3.1: This module has moved and is now available at @hapi/joi. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated topo@3.0.3: This module has moved and is now available at @hapi/topo. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated hoek@6.1.3: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
D:\Program Files\nodejs\node_global\vue -> D:\Program Files\nodejs\node_global\node_modules\@vue\cli\bin\vue.js

> core-js@3.1.2 postinstall D:\Program Files\nodejs\node_global\node_modules\@vue\cli\node_modules\core-js
> node -e "try { require('./scripts/postinstall'); } catch (e) { /* empty */ }"

Thank you for using core-js ( https://github.com/zloirock/core-js )!

Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> protobufjs@6.8.8 postinstall D:\Program Files\nodejs\node_global\node_modules\@vue\cli\node_modules\protobufjs
> node scripts/postinstall


> nodemon@1.19.0 postinstall D:\Program Files\nodejs\node_global\node_modules\@vue\cli\node_modules\nodemon
> node bin/postinstall || exit 0

Love nodemon? You can now support the project via the open collective:
 > https://opencollective.com/nodemon/donate

npm WARN rollback Rolling back node-pre-gyp@0.12.0 failed (this is probably harmless): EPERM: operation not permitted, lstat 'D:\Program Files\nodejs\node_global\node_modules\@vue\cli\node_modules\fsevents\node_modules'
npm WARN ts-node@8.1.0 requires a peer of typescript@>=2.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\@vue\cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ @vue/cli@3.7.0
added 677 packages from 508 contributors in 79.482s

安装成功。

 

转载于:https://www.cnblogs.com/wayneliu007/p/10919234.html

相关文章:

  • 创建数据结构库基础设施——异常类的构建
  • Windows下SVN的下载、安装
  • centOS7网络配置
  • angularJS 自定义服务
  • JqGrid纵向合并单元格
  • 线程池之ThreadPoolExecutor线程池源码分析笔记
  • Azure DevOps Server (TFS) 修改工作项附件大小限制
  • 二十三、NFS企业级优化
  • [百度百科]PCI-E的速度
  • AI numpy
  • zabbix 3.4 安装记录
  • 【原】常用shell命令
  • centos7下yum和python重装
  • 关于layui的日期和时间组件laydate闪屏的坑
  • 第七次作业
  • [Vue CLI 3] 配置解析之 css.extract
  • Java读取Properties文件的六种方法
  • KMP算法及优化
  • Laravel5.4 Queues队列学习
  • Python 反序列化安全问题(二)
  • Python学习之路13-记分
  • Redis中的lru算法实现
  • Selenium实战教程系列(二)---元素定位
  • 观察者模式实现非直接耦合
  • 京东美团研发面经
  • 模型微调
  • 小程序、APP Store 需要的 SSL 证书是个什么东西?
  • 一文看透浏览器架构
  • SAP CRM里Lead通过工作流自动创建Opportunity的原理讲解 ...
  • ​创新驱动,边缘计算领袖:亚马逊云科技海外服务器服务再进化
  • !!【OpenCV学习】计算两幅图像的重叠区域
  • #162 (Div. 2)
  • (4)STL算法之比较
  • (c语言版)滑动窗口 给定一个字符串,只包含字母和数字,按要求找出字符串中的最长(连续)子串的长度
  • (汇总)os模块以及shutil模块对文件的操作
  • (深度全面解析)ChatGPT的重大更新给创业者带来了哪些红利机会
  • (一)Dubbo快速入门、介绍、使用
  • (已解决)报错:Could not load the Qt platform plugin “xcb“
  • (转)清华学霸演讲稿:永远不要说你已经尽力了
  • .axf 转化 .bin文件 的方法
  • .bat文件调用java类的main方法
  • .NET : 在VS2008中计算代码度量值
  • .Net Core与存储过程(一)
  • .net framework profiles /.net framework 配置
  • .NET 的静态构造函数是否线程安全?答案是肯定的!
  • .NET/C# 使用 #if 和 Conditional 特性来按条件编译代码的不同原理和适用场景
  • .net下简单快捷的数值高低位切换
  • ??eclipse的安装配置问题!??
  • [ C++ ] STL---string类的使用指南
  • [BROADCASTING]tensor的扩散机制
  • [BZOJ2850]巧克力王国
  • [C/C++] C/C++中数字与字符串之间的转换
  • [CentOs7]图形界面
  • [CF703D]Mishka and Interesting sum/[BZOJ5476]位运算
  • [C和指针].(美)Kenneth.A.Reek(ED2000.COM)pdf