首页 > 其他分享 >npm run serve 报错

npm run serve 报错

时间:2023-06-08 22:13:16浏览次数:46  
标签:npm aa node Users ee serve Desktop login01 报错

​ 解决:npm run serve 错误,或者 npm run build 错误

错误原因:

使用了 过高版本的 Node.js

解决办法:

本人电脑上安装了,nvm 可以快速的 安装node 的其他版本,当 降版本到 Node v16.14.1 时,才可以正常运行(太坑了)

nvm 安装 v16.14.1  (或者 度娘一下,手动安装其他版本的即可)

nvm list available

nvm install 16.14.1

nvm use 16.14.1

node -v

C:\Users\aa\Desktop\login01\aa\ee>nvm list available

|   CURRENT    |     LTS      |  OLD STABLE  | OLD UNSTABLE |
|--------------|--------------|--------------|--------------|
|    20.2.0    |   18.16.0    |   0.12.18    |   0.11.16    |
|    20.1.0    |   18.15.0    |   0.12.17    |   0.11.15    |
|    20.0.0    |   18.14.2    |   0.12.16    |   0.11.14    |
|    19.9.0    |   18.14.1    |   0.12.15    |   0.11.13    |
|    19.8.1    |   18.14.0    |   0.12.14    |   0.11.12    |
|    19.8.0    |   18.13.0    |   0.12.13    |   0.11.11    |
|    19.7.0    |   18.12.1    |   0.12.12    |   0.11.10    |
|    19.6.1    |   18.12.0    |   0.12.11    |    0.11.9    |
|    19.6.0    |   16.20.0    |   0.12.10    |    0.11.8    |
|    19.5.0    |   16.19.1    |    0.12.9    |    0.11.7    |
|    19.4.0    |   16.19.0    |    0.12.8    |    0.11.6    |
|    19.3.0    |   16.18.1    |    0.12.7    |    0.11.5    |
|    19.2.0    |   16.18.0    |    0.12.6    |    0.11.4    |
|    19.1.0    |   16.17.1    |    0.12.5    |    0.11.3    |
|    19.0.1    |   16.17.0    |    0.12.4    |    0.11.2    |
|    19.0.0    |   16.16.0    |    0.12.3    |    0.11.1    |
|   18.11.0    |   16.15.1    |    0.12.2    |    0.11.0    |
|   18.10.0    |   16.15.0    |    0.12.1    |    0.9.12    |
|    18.9.1    |   16.14.2    |    0.12.0    |    0.9.11    |
|    18.9.0    |   16.14.1    |   0.10.48    |    0.9.10    |

This is a partial list. For a complete list, visit https://nodejs.org/en/download/releases

C:\Users\aa\Desktop\login01\aa\ee>nvm install 16.14.1
Downloading node.js version 16.14.1 (64-bit)...
Extracting node and npm...
Complete
npm v8.5.0 installed successfully.


Installation complete. If you want to use this version, type

nvm use 16.14.1

C:\Users\aa\Desktop\login01\aa\ee>nvm use 16.14.1
Now using node v16.14.1 (64-bit)

C:\Users\aa\Desktop\login01\aa\ee>npm -v
8.5.0

C:\Users\aa\Desktop\login01\aa\ee>node -v
v16.14.1

错误日志:

PS C:\Users\aa\Desktop\login01\aa\ee> npm run serve

> [email protected] serve
> vue-cli-service serve

 INFO  Starting development server...
 WARN  A new version of sass-loader is available. Please upgrade for best experience.
10% building 0/1 modules 1 active ...//10.245.74.2:8080&sockPath=/sockjs-node C:\Users\aa\Desktop\login01\aa\ee\node_modules\webpack\hot\dev-server.js ./src/main.10% building 2/4 modules 2 active C:\Users\aa\Desktop\login01\aa\ee\node_modules\webpack\hot\dev-server.jsError: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (C:\Users\aa\Desktop\login01\aa\ee\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\Users\aa\Desktop\login01\aa\ee\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (C:\Users\aa\Desktop\logi01\aa\ee\node_modules\webpack\lib\NormalModule.js:471:10)
    at C:\Users\aa\Desktop\login01\aa\ee\node_modules\webpack\lib\NormalModule.js:503:5
    at C:\Users\aa\Desktop\login01\aa\ee\node_modules\webpack\lib\NormalModule.js:358:12
    at C:\Users\aa\Desktop\login01\aa\ee\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\Users\aa\Desktop\login01\aa\ee\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (C:\Users\aa\Desktop\login01\aa\ee\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
    at C:\Users\aa\Desktop\login01\aa\ee\node_modules\loader-runner\lib\LoaderRunner.js:236:3
    at runSyncOrAsync (C:\Users\aa\Desktop\login01\aa\ee\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
    at iterateNormalLoaders (C:\Users\aaDesktop\login01\aa\ee\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
    at Array.<anonymous> (C:\Users\aa\Desktop\login01\aa\ee\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (C:\Users\aa\Desktop\login01\aa\ee\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
    at C:\Users\aa\Desktop\login01\aa\ee\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
10% building 2/5 modules 3 active ...C:\Users\aa\Desktop\login01\aa\ee\node_modules\eslint-loader\index.js??ref--14-0!C:\Users\aa\Desktop\login01\aa\ee\src\main.jsnode:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

    at new Hash (node:internal/crypto/hash:71:19)
    at module.exports (C:\Users\aa\Desktop\login01\aa\ee\node_modules\webpack\lib\util\createHash.js:135:53)
    at handleParseError (C:\Useraa\Desktop\login01\aa\ee\node_modules\webpack\lib\NormalModule.js:471:10)
    at C:\Users\aa\Desktop\login01\aa\ee\node_modules\webpack\lib\NormalModule.js:503:5
    at C:\Users\aa\Desktop\login01\aa\ee\node_modules\webpack\lib\NormalModule.js:358:12
    at C:\Users\aa广\Desktop\login01\aa\ee\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\Users\aa\Desktop\login01\aa\ee\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at Array.<anonymous> (C:\Users\top\login01\aa\ee\node_modules\graceful-fs\graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.16.0

运行一个新的vue项目时,报错异常。

尝试过以下几种方式

  1. npm install @vue/cli@3 -g 无效

  2. npm install @vue/cli@4 -g 无效

甚至 使用 vue create new_vue 创建一个新的项目后,都无法正常运行。

标签:npm,aa,node,Users,ee,serve,Desktop,login01,报错
From: https://www.cnblogs.com/ko25891wan/p/17467797.html

相关文章

  • QQ登录报错:redirect uri is illegal(100010)解决方案
    查看真实回调地址:通过腾讯开放平台:腾讯开放平台官网进入后,点击RUL编解码工具:在输入源串的表格里填入你登录QQ报错的网址(网址全部复制进去),点击URL解码:解码后,能查看到实际回调地址:实际回调地址就是redirect_uri=之后到第一个&符号或者问号截止的部分(也就是用矩形圈起来的地方),把这......
  • k8s执行crictl images报错
    FATA[0000]validateserviceconnection:CRIv1imageAPIisnotimplementedforendpoint"unix:///run/containerd/containerd.sock":rpcerror:code=Unimplementeddesc=unknownserviceruntime.v1.ImageService解决方法:找到runtime_type写入"io.conta......
  • MySQL 服务无法启动, 无法连接/ERROR 2003 (HY000): Can't connect to MySQL server o
    错误情况:状态1:ERROR2003(HY000):Can'tconnecttoMySQLserveron'localhost'(10061)状态2:mysql服务正在启动.mysql服务无法启动 第一步先配置环境 新增系统变量变量名:MYSQL_HOME变量值:mysql的安装目录(解压后目录)新增path配置编辑path新增:%MYSQL_HOME%\b......
  • 【转载】CXF spring jaxws:endpoint jaxws:server 区别 与 关系
    通过spring配置实现webservice的配置有两种,一种是jaxws:endpoint ,另外一种是jaxws:server。百度上没查到相关区别,又由于本人没有跟代码,所以又google了一下,才找到:First,theyareallfortheserversideconfiguration.Second,jaxws:endpointiscomingfromJAXWSAPI,a......
  • SQLServer查看端口号和修改端口号
    sqlserver默认的端口号是14331、查看端口号程序中找到SQLServerManagementStudio,连接sqlserver数据库,新建查询,运行execsys.sp_readerrorlog0,1,'listening'; 2、修改端口号所有程序中找到SQLServer配置管理器SQLServer网络配置--MSSQLSERVER的协议,TCP/IP,双击找到T......
  • 报错:[Vue warn]: Error in render: "TypeError: Cannot read properties of undefined
    1.错误详情2.错误分析百度此错误发现,很多人可能忘记在main.js中引入store.js并挂载在vue实例上,或者state单词写错了我审查了很多遍代码,依然报错,读取不到state中的数据,后来想到可能是版本的问题此项目是vue2,要使用vuex3才能正常运行,我安装的时候没有指定版本,直接装的是最新的v......
  • 关于项目报错“Error running 'All in IIDCNo junit.jar”
    在我跑一个项目的时候遇到了如图所示问题去网上搜,搜到了类似的解决方案,如下解决方法运行之后出现新的问题......
  • java 访问ingress https报错javax.net.ssl.SSLHandshakeException: Received fatal al
    一、报错及部署环境Java程序访问测试域名https方法正常,访问生产域名https域名报错,报错如下javax.net.ssl.SSLHandshakeException:Receivedfatalalert:protocol_version测试环境使用KubeSphereingress生产环境使用阿里云ACK服务的ingress配置二、问题原因客户端......
  • 什么是DS(Dedicated Server)
    本片博客参考:UE5DedicatedServer专用服务器与网络同步因为我之前是参与Web后端开发的,所以对游戏的服务器的理解还停留在上学时,也就是客户端不参与实际的运算,所有的运算与数据的下发都由服务器去控制,然后前后端分离。首先我们需要明确一个认知—UE5的客户端代码和服务器代码是......
  • zabbix--邮件告警报错“Support for SMTP authentication was not compiled in”
    邮件报警失败:SupportforSMTPauthenticationwasnotcompiledin 解决办法:升级curl版本具体操作步骤:1)安装curl #rpm-Uvhhttp://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-2-1.rhel6.noarch.rpm#yum--showduplicateslistc......