npm安装依赖报错npm ERR! code ENOTFOUND npm ERR! errno ENOTFOUND、npm run dev报错记录

npm安装依赖报错npm ERR! code ENOTFOUND npm ERR! errno ENOTFOUND_得我所得,爱我所爱的博客-CSDN博客npm安装依赖报错今天在学习webpack的时候,在使用npm install来安装一个局部的webpack时候,报出一下错误:npm ERR! code ENOTFOUNDnpm ERR! errno ENOTFOUNDnpm ERR! network request to http://registry.cnpmjs.org/webpack failed, reason: getaddrinfo ENOTFOUND proxy-sznnpm ERR! network This is a pro_npm err! code enotfoundhttps://blog.csdn.net/qq_45914170/article/details/112298654

C:\Users\8\Desktop\CS5\client_admin>npm run dev

报错:
> changsheng_project_admin@0.1.0 dev C:\Users\8\Desktop\CS5\client_admin
> vue-cli-service serve

 INFO  Starting development server...
98% after emitting CopyPlugin

 ERROR  Failed to compile with 1 error                                                                       12:43:36 AM

 error  in ./src/main.js

Syntax Error: BrowserslistError: [BABEL] C:\Users\8\Desktop\CS5\client_admin\src\main.js: C:\Users\8\Desktop\CS5\client_admin contains both .browserslistrc and browserslist (While processing: "C:\\Users\\8\\Desktop\\CS5\\client_admin\\node_modules\\@vue\\cli-plugin-babel\\preset.js")
    at Generator.next (<anonymous>)
    at Generator.next (<anonymous>)


 @ multi (webpack)-dev-server/client?http://10.34.187.254:8081&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

 这是一个关于 Vue.js 项目的错误信息,可能是由于项目中的 .browserslistrc 和 browserslist 文件冲突导致的。可以尝试删除其中一个文件或将其合并为一个文件来解决此问题。另外,也可以尝试更新您的 Babel 和 Vue CLI 版本以获得更好的兼容性。

 我就是删除了browserslist文件,运行结果如下:

C:\Users\8\Desktop\CS5\client_admin>npm run dev

> changsheng_project_admin@0.1.0 dev C:\Users\8\Desktop\CS5\client_admin
> vue-cli-service serve

 INFO  Starting development server...
10% building 4/5 modules 1 active ...r\lib\index.js!C:\Users\8\Desktop\CS5\client_admin\src\main.jsBrowserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
68% building 604/619 modules 15 active ...0220331154246\client_admin\node_modules\core-js\modules\es.string.iterator.js[BABEL] Note: The code generator has deoptimised the styling of C:\Users\8\Desktop\CS5\client_admin\src\assets\js\echarts.min.js as it exceeds the max of 500KB.
98% after emitting CopyPlugin

 WARNING  Compiled with 1 warning                                                                            12:49:49 AM

 warning  in ./src/components/common/page_side.vue?vue&type=template&id=230c6473&scoped=true&

Module Warning (from ./node_modules/vue-loader/lib/loaders/templateLoader.js):
(Emitted value instead of an instance of Error) <el-menu-item v-for="o in auth">: component lists rendered with v-for should have explicit keys. See https://vuejs.org/guide/list.html#key for more info.

 @ ./src/components/common/page_side.vue?vue&type=template&id=230c6473&scoped=true& 1:0-438 1:0-438
 @ ./src/components/common/page_side.vue
 @ ./src/plugins/component.js
 @ ./src/plugins/index.js
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://10.34.187.254:8082&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js


  App running at:
  - Local:   http://localhost:8082/
  - Network: http://10.34.187.254:8082/

  Note that the development build is not optimized.
  To create a production build, run npm run build.

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

北辰星Charih

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值