Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webpack-dev-server 命令不起作用呢 #2

Open
choukin opened this issue May 10, 2016 · 16 comments
Open

webpack-dev-server 命令不起作用呢 #2

choukin opened this issue May 10, 2016 · 16 comments

Comments

@choukin
Copy link

choukin commented May 10, 2016

E:\workspace\learnReact\webpackandreact>webpack-dev-server --port 8888
http://localhost:8888/webpack-dev-server/
webpack result is served from /
content is served from E:\workspace\learnReact\webpackandreact
E:\workspace\learnReact\webpackandreact>

我输入命令后 访问http://localhost:8888/webpack-dev-server/ 好像服务没启动,访问http://localhost:8888/也是提示服务没启动 请问这个问题遇到过吗

@theJian
Copy link
Owner

theJian commented May 10, 2016

webpack-dev-server 有什么报错吗?
访问返回的是什么?
有其他错误信息吗?
教程中并没有对 webpack-dev-server 进行更深入的配置, 所以确保每次先 webpack 构建 bundle.js, 然后再启动服务器

@choukin
Copy link
Author

choukin commented May 10, 2016

没有报错 我输入webpack-dev-server命令后提示

http://localhost:8080/webpack-dev-server/
webpack result is served from /
content is served from E:\workspace\learnReact\webpackandreact

然后我访问http://localhost:8080/webpack-dev-server/报404应该是服务没有启动成功

@Happy-xiaoxi
Copy link

@choukin 先使用webpack命令打包js文件到bundle.js 然后再启动服务 webpack-dev-server

@peifeiqiang
Copy link

怎么打包到bundle.js 我是直接webpack 这样行不行啊

@theJian
Copy link
Owner

theJian commented Sep 8, 2016

运行 webpack 打包

我是不是改成

运行 webpack 命令打包

会比较好, 原文是不是引起很多人的疑惑

@peifeiqiang
Copy link

能加一下好友么 我这里有webpack后爆红

@peifeiqiang
Copy link

1060551675 qq

@theJian
Copy link
Owner

theJian commented Sep 8, 2016

把详细错误和配置贴出来, 这样大家才可能帮助你, 也能帮到遇到同样问题的童鞋, 如果没有办法重现错误是很难给予帮助的.

@peifeiqiang
Copy link

1ytg417r vkhik tusdjf

@Happy-xiaoxi
Copy link

app.js 的问题,对目录不合法的操作,从app文件夹找找问题

@peifeiqiang
Copy link

我试了好几次 和你这教程做的一样 都是这个结果

@theJian
Copy link
Owner

theJian commented Sep 9, 2016

我照着教程自己试了一次 (搭建开发环境部分), 没有遇到问题, 我手上暂时没有 windows 的机器.

@Happy-xiaoxi
Copy link

Mac 表示没问题

@peifeiqiang
Copy link

这是个悲伤的话题

@Happy-xiaoxi
Copy link

我也是按着教程做的时候出现各种问题,按着问题提示从网上多搜一下,可能就会有答案

@choukin
Copy link
Author

choukin commented Sep 30, 2016

mac上没有出现问题,感觉和环境有关系

@github-staff github-staff deleted a comment Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants