错误代码如下:

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的更多相关文章

  1. vue项目npm run dev报错events.js:160 throw er; // Unhandled 'error' event listen EADDRINUSE :::8002

    出错情况,如下图: 报错原因: listen EADDRINUSE :::8002 意思是当前8002端口被占用 解决办法: 一:简单粗暴:关掉可能影响的相关程序,重新执行启动. 二: 1.Win+R ...

  2. npm run dev时报错“events.js:160 throw er; // Unhandled 'error' event”

    经查,此问题由端口占用导致,node服务器默认端口8080已被其他程序占用,关闭占用端口的程序或者修改node服务器的默认端口即可解决此问题

  3. nodejs报错 events.js:72 throw er; // Unhandled 'error' event

    var http = require('http'); var handlerRequest = function(req,res){ res.end('hello');}; var webServe ...

  4. 运行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 ...

  5. 运行node提示:events.js:160 throw er; // Unhandled 'error' event

    运行node时遇到下述提示: events.js:160  throw er; // Unhandled 'error' event或者events.js:160       throw er; // ...

  6. events.js:72 throw er; // Unhandled 'error' event

    http://stackoverflow.com/questions/24525253/events-js72-throw-er-unhandled-error-event 出现了一个上述的错误. e ...

  7. browser-sync events.js:85 throw er; // Unhandled 'error' event

    browser-sync运行的时候提示如下错误,这个是因为browser-sync 配置的端口被占用的原因. events.js:85 throw er; // Unhandled 'error' e ...

  8. 错误码:events.js:183 throw er; // Unhandled 'error' event ^ Error: listen EADDRINUSE :::8081

    错误的产生: 错误的原因: 端口被占用 修改访问端口就可以了 https://blog.csdn.net/qq_25479327/article/details/79824742

  9. 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 ...

随机推荐

  1. hdu 1540 Tunnel Warfare 线段数区间合并

    Tunnel Warfare Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) P ...

  2. RedHat 6.4企业版利用iso镜像做本地yum源

    修改文章:http://linux.cn/article-1017-1.html 而RedHat的yum则需要注册付费才能使用,如果不这样则有两种解决方案 1. 利用iso镜像做本地yum源 2. 利 ...

  3. 基本sql查询语句练习

    Student(S#,Sname,Sage,Ssex) 学生表  Course(C#,Cname,T#) 课程表  SC(S#,C#,score) 成绩表  Teacher(T#,Tname) 教师表 ...

  4. Pandas分组(GroupBy)

    任何分组(groupby)操作都涉及原始对象的以下操作之一.它们是 - 分割对象 应用一个函数 结合的结果 在许多情况下,我们将数据分成多个集合,并在每个子集上应用一些函数.在应用函数中,可以执行以下 ...

  5. scala学习手记26 - 重用函数值

    函数值对消除代码重复有很大的帮助.但是像函数值这样直接将一个函数作为另一个函数的参数却不太利于函数值本身的重用. 来看一个例子: class Equipment(val routine: Int =& ...

  6. Java_WebKit

    1. http://tieba.baidu.com/p/2807579276 下载地址: http://qtjambi.org/downloads https://qt.gitorious.org/q ...

  7. 使用springmvc时报错HTTP Status 400 -

    这个错误大多是因为,jsp的form表单提交的字段类型和后台接收字段类型不匹配造成的(例如,form中为String,后台接收为Integer). 我这里就是jsp表单中的日期数据没有写明类型,然后用 ...

  8. 交换机上的trunk,hybrid,access配置和应用(转)

    交换机上的trunk,hybrid,access配置和应用 以太网端口的链路类型: Access类型:端口只能属于一个vlan,一般用于连接计算机. Trunk类型:端口可以属于端个vlan,可以接收 ...

  9. 《The Cg Tutorial》阅读笔记——动画 Animation

    这段时间阅读了英文版的NVidia官方的<The Cg Tutorial>,借此来学习基本的图形学知识和着色器编程. 在此做一个阅读笔记. 本文为大便一箩筐的原创内容,转载请注明出处,谢谢 ...

  10. Centos6.8 Jetty 安装配置

    ssh root@IP Password------------------------------------------------------------------------------↑登 ...