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 ...
随机推荐
- 画龙点睛 之RabbitMQ 初来乍到
消息队列解决了什么问题 1. 异步处理 2. 应用解耦 3. 流量削峰 4. 日志处理...... 安装RabbitMQ (这里的安装我只仅仅说一下linux 的安装 如果想安装windows 版 可 ...
- TCP中间件_个人方案
按照功能分类,不管是直接的 insert/delete/update/select语句 还是 调用存储过程,基本的功能 就是 增删改查.又分为两大类: (1).查询(会返回结果集的),(2).非查询( ...
- svn官方版本的使用
创建仓库的命令是:svndadmin create c:\abcde 启动命令是:svnserve -d -r c:\abcde 官方版本,svn路径
- Http请求原理与相关知识
1.在浏览器地址栏输入URL,按回车后经过了哪些步骤 1-1. 浏览器向DNS服务器请求解析该URL中的域名及所对应的IP地址; 1-2. 解析出IP地址后,根据该IP地址和默认端口80与服务器建立 ...
- python学习笔记(excel简单操作)
现在的目标是设计一个接口自动化测试框架 用例写在excel里面 利用python自带的pyunit构建 之前已经安装好了处理excel的模块 这次简单的使用下 提前创建好excel文件 “testca ...
- Maven的生命周期阶段
一.Maven的生命周期 Maven的生命周期就是对所有的构建过程进行抽象和统一.包含了项目的清理.初始化.编译.测试.打包.集成测试.验证.部署和站点生成等几乎所有的构建步骤. Maven的生命周期 ...
- angular指令详解--自定义指令
自定义指令 directive()这个方法是用来定义指令的: angular.module('myApp', []) .directive('myDirective', function ($time ...
- Windows Desktop Optimization.bat
界面: github: https://github.com/m2nlight/WindowsDesktopOptimization Config Service [Disabled] Windows ...
- 51nod 1406 位运算/dp
http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1406 1406 与查询 题目来源: CodeForces 基准时间限制: ...
- 前端工程师(JavaScript)在业余时间如何提高自身能力
1.前端工程师(JavaScript)在业余时间如何提高自身能力? https://www.zhihu.com/question/40186398?sort=created 2.前端开发工程师必读书籍 ...