Comments (7)
过两天我把之前没传上去的放上去,这个是工作的项目,当时只把webpack.config.js的配置写了很多注释
from webpack2.
上传了最近学习的一个项目,npm run serve可以预览。@soraly
from webpack2.
嗯嗯,好的,谢啦!你的注释写的很详细,对我这样的新手挺有帮助的
from webpack2.
重新克隆下来,运行npm run server就可以预览,目前只写一个复杂的交互页面,其他的抽空写,多页面主要是处理入口文件,用node来读取入口文件名称就行,其他配置基本跟单页面一样。@soraly
from webpack2.
刚刚试了下,npm run server时报错了,我的node版本是6.9.2,也挺新的,为什么会报错呢?
[email protected] test F:\VueDemos\webpack2
webpack-dev-server
events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EACCES 127.0.0.1:8888
at Object.exports._errnoException (util.js:1022:11)
at exports._exceptionWithHostPort (util.js:1045:20)
at Server._listen2 (net.js:1246:19)
at listen (net.js:1295:10)
at net.js:1405:9
at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:62:16)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:81:10)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "test"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] test: webpack-dev-server
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test script 'webpack-dev-server'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the webpack package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs webpack
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls webpack
npm ERR! There is likely additional logging output above.
from webpack2.
跟node版本没关系,先执行npm i安装所有依赖,然后把webpack配置的端口号改成7777再试一下,我不知道是不是Windows电脑存在环境问题还是啥的,我用的mac没法重现你的问题,试一试npm run dev看看,然后直接在dev目录手动在浏览器打开地址。@soraly
from webpack2.
之前一直在忙别的,今天重新克隆安装了一遍居然就好了。。稍微看了下,东西都挺全的,可惜没有vuex。。
from webpack2.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpack2.