gitee使用Sourcetree克隆 无法运行项目

npm install报错404

$ vue-cli-service serve --mode dev 'vue-cli-service' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 error command failed with exit code 1.

npm err! code e404

npm err! 404 not found - get https://registry.npmjs.org/@chohotech%2flyoral-component - not found

npm err! 404

npm err! 404 '@chohotech/lyoral-component@0.1.20230706140238' is not in this registry.

npm err! 404 npm err! 404 note that you can also install from a npm err! 404 tarball, folder, http url, or git url.

npm err! a complete log of this run can be found in:

npm err! c:\users\29847\appdata\local\npm-cache\_logs\2023-07-21t05_55_42_586z-debug-0.log

排除网上各种关于镜像的解决办法;

出现错误的原因是,我在npm上的用户名是A,而我的包名是 @B/xxxx。

npm规定包名中,@后是用户名,我这里是B,而我的用户名是A。这就是报错的原因。

解决办法也很简单,修改包名,或者用B的账号publish就可以了。

我是少了一个.npmrc文件;该文件添加到根目录就跑起来了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值