首页 > 其他分享 >安装npm install报错npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! network request to https://

安装npm install报错npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! network request to https://

时间:2024-01-13 16:47:53浏览次数:35  
标签:npm ERR standard WARN eslint config ETIMEDOUT

执行命令:npm run dev 启动前端项目报如下错误,vue-cli-service是Vue一个启动的插件,需要安装

D:\nodejs\npm.cmd run dev
> yuntan1hao@2.0.0 dev
> vue-cli-service serve --open
'vue-cli-service' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
Process finished with exit code 1

 

 

执行npm install安装vue-cli-service报错,根据提示可知链接超时:

Windows PowerShell
版权所有(C) Microsoft Corporation。保留所有权利。

安装最新的 PowerShell,了解新功能和改进!https://aka.ms/PSWindows

PS E:\20231213\kuangshan\cepp_web_mine> npm install
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: eslint-config-standard@12.0.0
npm WARN Found: eslint-plugin-node@6.0.1
npm WARN node_modules/eslint-plugin-node
npm WARN   eslint-plugin-node@"^6.0.1" from @vue/eslint-config-standard@3.0.5
npm WARN   node_modules/@vue/eslint-config-standard
npm WARN     dev @vue/eslint-config-standard@"^3.0.0-beta.10" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint-plugin-node@">=7.0.0" from eslint-config-standard@12.0.0
npm WARN node_modules/@vue/eslint-config-standard/node_modules/eslint-config-standard
npm WARN   eslint-config-standard@"^12.0.0-alpha.0" from @vue/eslint-config-standard@3.0.5
npm WARN   node_modules/@vue/eslint-config-standard
npm WARN
npm WARN Conflicting peer dependency: eslint-plugin-node@11.1.0
npm WARN node_modules/eslint-plugin-node
npm WARN   peer eslint-plugin-node@">=7.0.0" from eslint-config-standard@12.0.0
npm WARN   node_modules/@vue/eslint-config-standard/node_modules/eslint-config-standard
npm WARN     eslint-config-standard@"^12.0.0-alpha.0" from @vue/eslint-config-standard@3.0.5
npm WARN     node_modules/@vue/eslint-config-standard
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: eslint-config-standard@12.0.0
npm WARN Found: eslint-plugin-promise@undefined
npm WARN node_modules/@vue/eslint-config-standard/node_modules/eslint-plugin-promise
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer eslint-plugin-promise@">=4.0.0" from eslint-config-standard@12.0.0
npm WARN node_modules/@vue/eslint-config-standard/node_modules/eslint-config-standard
npm WARN   eslint-config-standard@"^12.0.0-alpha.0" from @vue/eslint-config-standard@3.0.5
npm WARN   node_modules/@vue/eslint-config-standard
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: eslint-config-standard@12.0.0
npm WARN Found: eslint-plugin-standard@3.1.0
npm WARN node_modules/eslint-plugin-standard
npm WARN   eslint-plugin-standard@"^3.1.0" from @vue/eslint-config-standard@3.0.5
npm WARN   node_modules/@vue/eslint-config-standard
npm WARN     dev @vue/eslint-config-standard@"^3.0.0-beta.10" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer eslint-plugin-standard@">=4.0.0" from eslint-config-standard@12.0.0
npm WARN node_modules/@vue/eslint-config-standard/node_modules/eslint-config-standard
npm WARN   eslint-config-standard@"^12.0.0-alpha.0" from @vue/eslint-config-standard@3.0.5
npm WARN   node_modules/@vue/eslint-config-standard
npm WARN
npm WARN Conflicting peer dependency: eslint-plugin-standard@5.0.0
npm WARN node_modules/eslint-plugin-standard
npm WARN   peer eslint-plugin-standard@">=4.0.0" from eslint-config-standard@12.0.0
npm WARN   node_modules/@vue/eslint-config-standard/node_modules/eslint-config-standard
npm WARN     eslint-config-standard@"^12.0.0-alpha.0" from @vue/eslint-config-standard@3.0.5
npm WARN     node_modules/@vue/eslint-config-standard
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/webpack-subresource-integrity failed, reason:
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in: D:\nodejs\node_cache\_logs\2024-01-13T07_50_13_728Z-debug-0.log
PS E:\20231213\kuangshan\cepp_web_mine>

执行npm config set registry https://registry.npm.taobao.org切换镜像后再次执行npm install又报错ERESOLVE could not resolve,可能是由于项目里各种版本的插件不一致,而插件之间又相互之间形成了依赖关系,但是npm7及以上版本中npm默认是对peer依赖进行验证。

PS E:\20231213\kuangshan\cepp_web_mine> npm config set registry https://registry.npm.taobao.org
PS E:\20231213\kuangshan\cepp_web_mine> npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: yuntan1hao@2.0.0
npm ERR! Found: webpack@4.46.0
npm ERR! node_modules/webpack
npm ERR!   peer webpack@"^4.0.0" from @intervolga/optimize-cssnano-plugin@1.0.6
npm ERR!   node_modules/@intervolga/optimize-cssnano-plugin
npm ERR!     @intervolga/optimize-cssnano-plugin@"^1.0.5" from @vue/cli-service@3.12.1
npm ERR!     node_modules/@vue/cli-service
npm ERR!       dev @vue/cli-service@"^3.0.1" from the root project
npm ERR!   peer webpack@"^4.0.0 || ^5.0.0" from @soda/friendly-errors-webpack-plugin@1.8.1
npm ERR!   node_modules/@soda/friendly-errors-webpack-plugin
npm ERR!     @soda/friendly-errors-webpack-plugin@"^1.7.1" from @vue/cli-service@3.12.1
npm ERR!     node_modules/@vue/cli-service
npm ERR!       dev @vue/cli-service@"^3.0.1" from the root project
npm ERR!   20 more (@vue/cli-plugin-babel, @vue/cli-plugin-eslint, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! webpack-subresource-integrity@"^5.2.0-rc.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: webpack@5.89.0
npm ERR! node_modules/webpack
npm ERR!   peer webpack@"^5.12.0" from webpack-subresource-integrity@5.2.0-rc.1
npm ERR!   node_modules/webpack-subresource-integrity
npm ERR!     webpack-subresource-integrity@"^5.2.0-rc.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! D:\nodejs\node_cache\_logs\2024-01-13T08_08_09_495Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: D:\nodejs\node_cache\_logs\2024-01-13T08_08_09_495Z-debug-0.log

 

执行npm install --legacy-peer-deps命令,后面加上--legacy-peer-deps,根据legacy中文含义“(软件或硬件)已过时但因使用范围广而难以替代的”可知就算peer的依赖没用满足条件也能安装,如下图最终安装成功:

PS E:\20231213\kuangshan\cepp_web_mine> npm install --legacy-peer-deps
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated har-validator@4.2.1: this library is no longer supported
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated eslint-loader@2.2.1: This loader has been deprecated. Please use eslint-webpack-plugin
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated cryptiles@2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
npm WARN deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated axios@0.18.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated request@2.81.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated html-webpack-plugin@3.2.0: 3.x is no longer supported
npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)

added 1718 packages in 2m

99 packages are looking for funding
  run `npm fund` for details
PS E:\20231213\kuangshan\cepp_web_mine>

 

标签:npm,ERR,standard,WARN,eslint,config,ETIMEDOUT
From: https://www.cnblogs.com/fenglangjuxu/p/17962517

相关文章

  • 【解决方案】Error running,Command line is too long
    一、现象IDEA提示Errorrunning,Commandlineistoolong二、原因Java命令行启动举例如下图,当命令行字符过多的时候,就会出现Errorrunning,Commandlineistoolong的问题三、解决思路上图是最终解决方案,下文会再次出现。现在主要是讲解none、JARmanifest是什......
  • Terraform 的开源替代:OpenTofu 宣布 GA!
    OpenTofu社区于1月10日宣布OpenTofu项目GA,这是OpenTofu的首个稳定版本(https://github.com/opentofu/opentofu/releases/tag/v1.6.0)!OpenTofu是Linux基金会下的一个由社区驱动的开源项目,是Terraform的开源替代品,用户可根据迁移指南进行迁移:https://opentofu.org/docs/in......
  • onnx.onnx_cpp2py_export.checker.ValidationError
    onnx.onnx_cpp2py_export.checker.ValidationError引言在深度学习领域,模型转换和模型部署是非常关键的环节。OpenNeuralNetworkExchange(ONNX)是一种开放的深度学习模型表示和转换的标准,为不同深度学习框架之间的模型共享和使用提供了便利。在ONNX中,模型的正确性和兼容性是非......
  • ORA-01041: internal error: hostdef extension doesn't exist错误侦察
    如果在使用netca工具安装监听时就发生了ORA-01041:internalerror:hostdefextensiondoesn'texist的错误,可能是由于配置或环境设置的问题。以下是一些建议的步骤:检查环境变量:确保ORACLE_HOME和ORACLE_SID等必要的环境变量已经正确设置。在使用netca工具时,确保使用了......
  • VSCode 终端显示“pnpm : 无法加载文件 C:\Program Files\nodejs\npm.ps1,因为在此
    如果出现以下问题: 解决方案:1.用get-ExecutionPolicy命令在vscode终端查询状态get-ExecutionPolicy#返回Restricted说明状态是禁止的Restricted2.用set-ExecutionPolicyRemoteSigned命令更改状态即可set-ExecutionPolicyRemoteSigned此时再输入 get-ExecutionP......
  • NullInjectorError: R3InjectorError(AccountModule)[ModalHelper -> NzModalService
    异常: 出现异常背景:增加包@delon/chart后运行项目出现此异常 解决方法:造成的原因是出现了不同版本的ng-zorro-antd方式一:删除项目下node_modules、package-lock.json或yarn.lock文件后重新安装依赖方式二:找到package.json中定义以外的ng-zorro-antd版本删除,此处发现......
  • nuxt构建失败:if (codePoint 》= 0x3_00 && codePoint (= 0x3_6F) { SyntaxError: In
     错误消息指的是在Node.js中使用了数字分隔符,12.8.1之前的Node版本不支持这种做法。0x3_00此处使用数字分隔符_。如果没有它,符号看起来就像0x300。有关支持此功能的Node.js版本的列表,请参阅https://node.green/#ES2021-features--numeric-separators。需要将node:10-alpin......
  • Thread 之 interrupt、isInterrupted、interrupted 方法
    interrupt():打断sleep、wait、join的线程会抛出InterruptedException异常并清除打断标记,如果打断正在运行的线程、park的线程则会重新设置打断标记isInterrupted():不会清除打断标记interrupted():会清除打断标记一、调用interrupt()方法中断正在运行的线程@Slf4j......
  • 1.9 Rotated Multi-Scale Interaction Network for Referring Remote Sensing Image S
    RotatedMulti-ScaleInteractionNetworkforReferringRemoteSensingImageSegmentation参考遥感图像分割的旋转多尺度交互网络参考遥感图像分割(RRSIS)是一个新的挑战,它结合了计算机视觉和自然语言处理,通过文本查询描述了航空图像中的特定区域。传统的参考图像分割(RIS)......
  • SciTech-Github-解决git push时的 Error: hasDotgit: contains '.git'
    AbaelsMacBookPro:pelicanabaelhe$gitpushEnumeratingobjects:6872,done.Countingobjects:100%(6872/6872),done.Deltacompressionusingupto8threadsCompressingobjects:100%(4305/4305),done.remote:error:object93c3f3e6d30672571d972693d0842a......