执行命令: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 install报错npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! network request to https://registry.npmjs.org/webpack-subresource-integrity failed, reason的更多相关文章

  1. 执行npm install报错:npm ERR! code EINTEGRITY

    命令行执行npm install报错如下: D:\frontend\viewsdev>npm install npm ERR! code EINTEGRITY npm ERR! sha512-8 ...

  2. npm install 报错:node-pre-gyp ERR! 问题解决

    npm install报错问题解决 问题: E:\CodeSpace\GitlabTest\desktop>npm install > lifeccp-desktop@1.1.9 post ...

  3. 在运行vue项目时,执行npm install报错小记

    在运行vue项目时,执行npm install 报错,导致后续的执行报各种错误,根据报错,尝试了网上的各种办法,最后发现时网络问题下载失败导致,解决办法: 安装cnpm==>npm instal ...

  4. npm install 报错 error Unexpected end of JSON input while parsing near '...sShrinkwrap":false,"d' 解决办法

    npm install 报错 : error Unexpected end of JSON input while parsing near '...sShrinkwrap":false,& ...

  5. npm install 报错解决办法

    npm install 报错解决办法 原因是因为node_modules可能有意外改动,导致依赖库不完整,删除项目下的node_modules,在你的项目目录下,重新执行npm install,这会重 ...

  6. npm install 报错:ERR! code EINTEGRITY 解决方案

    npm升级后,npm install 报错了,报错信息:ERR! code EINTEGRITY到处百度搜索解决方案,终于找到了!“npm cache verify”这条命令帮助了不少人 npm ca ...

  7. npm install 报错,提示`gyp ERR! stack Error: EACCES: permission denied` 解决方法

    m install 报错,提示gyp ERR! stack Error: EACCES: permission denied 猜测可能是因为没有权限读写,ls -la看下文件权限设置情况 [root@ ...

  8. npm install 报错ERR! 404 Not Found: event-stream@3.3.6

    在win下开发的node工程,在linux下用dockerfile部署时,遇到npm install时报错 Step / : RUN npm install ---> Running in 2e ...

  9. WSL中使用npm install报错

    报错内容类似下面的格式.具体解决方法请看这里:https://github.com/Microsoft/WSL/issues/14 着重关注 https://github.com/Microsoft/ ...

  10. npm install报错

    npm ERR!    C:\Users\xxxxxx\AppData\Roaming\npm-cache\_logs\2019-02-27T07_48_47_283Z-debug.log " ...

随机推荐

  1. .NET Core开发实战(第27课:定义Entity:区分领域模型的内在逻辑和外在行为)--学习笔记

    27 | 定义Entity:区分领域模型的内在逻辑和外在行为 上一节讲到领域模型分为两层 一层是抽象层,定义了公共的接口和类 另一层就是领域模型的定义层 先看一下抽象层的定义 1.实体接口 IEnti ...

  2. Java基础综合测试

    Java版基础练习题: 输入练习: [问题描述] 任务很简单: 给定若干个整数,请编程输出它们的和. [输入形式] 输入包含多组测试用例. 每组测试数据首先是一个正整数N,表示本组数据有N个整数. 请 ...

  3. NC50243 小木棍

    题目链接 题目 题目描述 乔治有一些同样长的小木棍,他把这些木棍随意砍成几段,直到每段的长都不超过50.现在,他想把小木棍拼接成原来的样子,但是却忘记了自己开始时有多少根木棍和它们的长度.给出每段小木 ...

  4. Kubernetes上使用Ingress Nginx将服务发布到外部IP

    Kubernetes的网络结构 K8s的网络相对比较复杂, 包含了如下几类IP地址: Host Network 运行K8s集群的宿主服务器的内网IP, 其网段在配置宿主机时设置. 这些服务器可能是物理 ...

  5. 【Unity3D】程序纹理简单应用

    1 几何纹理应用 ​ 本文所有案例的完整资源详见→Unity3D程序纹理简单应用. 1.1 边框 ​ 1)边框子图 ​ Border.shadersubgraph ​ 说明:Any 节点用于判断输入向 ...

  6. 【Unity3D】法线贴图和凹凸映射

    1 法线贴图原理 ​ 表面着色器中介绍了使用表面着色器进行法线贴图,实现简单快捷.本文将介绍使用顶点和片元着色器实现法线贴图和凹凸映射,实现更灵活. ​ 本文完整代码资源见→法线贴图和凹凸映射. ​ ...

  7. Spring Cloud Gateway微服务网关快速入门

    介绍 Spring Cloud Gateway 是 Spring 官方基于 Spring 5.0,Spring Boot 2.0 和 Project Reactor 等技术开发的网关,Spring C ...

  8. Annotation-specified bean name conflicts with existing

    问题说明 Annotation-specified bean name conflicts with existing,non-compatible bean definition of same n ...

  9. Spring Boot学生信息管理系统项目实战-2.字典管理和模板管理

    1.获取源码 源码是捐赠方式获取,详细请QQ联系我 :) 2.实现效果 3.项目源码 只挑重点讲,详细请看源码. 3.1 字典管理 字典管理这里分为字典的编码和名称和字典数据的增删改查. 前端页面: ...

  10. Python之记录日志

    日志级别 DEBUG: 最低级别,用于调试小细节. INFO:记录程序中的一般事件或确认一切工作正常. WARNING:表示可能出现的问题,但不会终止程序工作. ERROR:用于记录错误,会导致程序失 ...