npm run dev报错,events.js:160 throw er; // Unhandled 'error' event
错误代码如下:
vue-project@1.0.0 dev E:MySoftwaretestGitwebpackvue-projectnode build/dev-server.js "8088"
events.js:160 throw er; // Unhandled 'error' event
^
Error: listen EACCES 0.0.0.0:8080 at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at Server._listen2 (net.js:1244:19)
at listen (net.js:1293:10)
at Server.listen (net.js:1389:5)
at EventEmitter.listen (E:\MySoftware\testGit\webpack\vue-project\node_modules\express\lib\application.js:617:24)
at Object.<anonymous> (E:\MySoftware\testGit\webpack\vue-project\build\dev-server.js:62:22)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
解决方案:
网上找很多帖子,都没有写解决办法,自己来喽,也是神奇的错误
最后,神奇的是,错误居然被哦改好了
解决办法
进入 vue-demo/config/index.js
dev: {
env: require('./dev.env'),
port: 8088, # 注意了啊。。。修改成你要的端口,接着运行代码就看到效果了
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// CSS Sourcemaps off by default because relative paths are "buggy"
// with this option, according to the CSS-Loader README
// (https://github.com/webpack/css-loader#sourcemaps)
// In our experience, they generally work as expected,
// just be aware of this issue when enabling this option.
cssSourceMap: false
}
然后运行就变成8088端口了。
npm run dev报错,events.js:160 throw er; // Unhandled 'error' event的更多相关文章
- vue项目npm run dev报错events.js:160 throw er; // Unhandled 'error' event listen EADDRINUSE :::8002
出错情况,如下图: 报错原因: listen EADDRINUSE :::8002 意思是当前8002端口被占用 解决办法: 一:简单粗暴:关掉可能影响的相关程序,重新执行启动. 二: 1.Win+R ...
- npm run dev时报错“events.js:160 throw er; // Unhandled 'error' event”
经查,此问题由端口占用导致,node服务器默认端口8080已被其他程序占用,关闭占用端口的程序或者修改node服务器的默认端口即可解决此问题
- nodejs报错 events.js:72 throw er; // Unhandled 'error' event
var http = require('http'); var handlerRequest = function(req,res){ res.end('hello');}; var webServe ...
- 运行npm run watch时报:events.js:182 throw er; // Unhandled 'error' event
I had this issue i did the following steps and i have no issues anymore: Delete node_modules directo ...
- 运行node提示:events.js:160 throw er; // Unhandled 'error' event
运行node时遇到下述提示: events.js:160 throw er; // Unhandled 'error' event或者events.js:160 throw er; // ...
- events.js:72 throw er; // Unhandled 'error' event
http://stackoverflow.com/questions/24525253/events-js72-throw-er-unhandled-error-event 出现了一个上述的错误. e ...
- browser-sync events.js:85 throw er; // Unhandled 'error' event
browser-sync运行的时候提示如下错误,这个是因为browser-sync 配置的端口被占用的原因. events.js:85 throw er; // Unhandled 'error' e ...
- 错误码:events.js:183 throw er; // Unhandled 'error' event ^ Error: listen EADDRINUSE :::8081
错误的产生: 错误的原因: 端口被占用 修改访问端口就可以了 https://blog.csdn.net/qq_25479327/article/details/79824742
- vue init初始化项目后 npm run dev报错 10% building modules 1/1 modules 0 activeevents.js:182 throw er; // Unhandled 'error' event
报错信息: 10% building modules 1/1 modules 0 activeevents.js:182 throw er; // Unhandled 'error' ev ...
随机推荐
- 小米智能家居接入智能家居平台homeassistant的方法
[原文] 在安装和设置完homeassistant之后,我们终于来到激动人心的一步——把智能家居产品接入homeassistant了.把智能家居产品接入homeassistant智能家居平台之后,就可 ...
- spring与quartz整合
这周学习了quartz定时任务,现在进行总结一下.首先要认识定时任务中几个关键接口,以及各个接口之间是如何联系起来的. 1.关键接口 (1)Scheduler,任务调度的API,它可以用来启动或者终 ...
- javascript打开新页面的方法
方案一: A标签: 这里要注意target的设置,_Blank是指新窗口,也可以用js来模拟创建. <a href="http://www.cnblogs.com" targ ...
- Spring -- 如何为applicationContext.xml 添加 util 的 *.xsd文件
- 支付宝app支付java后台流程、原理分析(含nei wang chuan tou)
java版支付宝app支付流程及原理分析 本实例是基于springmvc框架编写 一.流程步骤 1.执行流程 当手机端app(就是你公司开发的app)在支付 ...
- chrome跨域拓展工具
下载chrome跨域扩展工具 1) http://crx.2333.me/ 扩展程序id:nlfbmbojpeacfghkpbjhddihlkkiljbi
- 关于Action和EventHandler
.net框架自带的两个常用类(Action和EventHandler),当然这两个类型的也可以自定义,但系统已经提供,直接拿来用即可,很方便 1:Action : 引用“void方法”的委托,目前框架 ...
- SessionUtils
import com.diyfintech.constant.Constant.SuperAdmin; import com.diyfintech.pojo.SysUser; import org.a ...
- OpenCV人脸检测并把图片写成avi视频
读出某一个文件夹下“jpg”后缀的全部图片后,用的OpenCV自带的人脸检测检测图片中的人脸,调整图片的大小写成一个avi视频. 主要是要记录一下CvVideoWriter的用法和如何从文件夹中读取某 ...
- 一次完整的HTTP请求
HTTP通信机制是在一次完整的HTTP通信过程中,Web浏览器与Web服务器之间将完成下列7个步骤: 1:建立TCP连接,TCP的三次握手 在HTTP工作开始之前,Web浏览器首先要通过网络与Web服 ...