想学习一下vue-hackernews-2.0
这个例子,就从github上clone了一份。
运行npm install后提示
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN extract-text-webpack-plugin@2.1.2 requires a peer of webpack@^2.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN sw-precache-webpack-plugin@0.10.1 requires a peer of webpack@^1 || ^2 || ^2.1.0-beta || ^2.2.0-beta but none is installed. You must install peer dependencies yourself.
我安装着webpack3
应该没什么影响。
然后我npm run dev
提示正常
> vue-hackernews-2.0@ dev /Users/fuckc/Documents/vue-hackernews-2.0
> node server
server started at localhost:8080
DONE Compiled successfully in 2518ms 19:15:38
DONE Compiled successfully in 2818ms 19:15:38
webpack built 1345b8affebfcb6afefa in 2818ms
但是网页却没有弹出来,
我又执行了npm run build
和npm start
依然没有弹出网站,
请问这是什么情况?
这个是因为获取数据的网站https://hacker-news.firebasei... 无法访问导致无法获取数据
可以看下官方的提问
[官方issues] https://github.com/vuejs/vue-...
需要对终端翻墙,教程链接https://juejin.im/entry/58d29...
我参考(照搬)了大神的[beauty-enjoy] https://github.com/beauty-enj... 仓库,删除了firebase相关的配置和原先的页面,初衷是为了当做自己以后搭建ssr项目初始化。
【项目地址】https://github.com/MrSuperJ/a...
可以和尤大以及beauty项目对比,帮助新手更快理解vue-ssr吧~!
------------18.6.14-------------
1.自己项目打不开的问题已经解决,大家可以放心打开,无耻的求个star
2.以现在来看,我会直接使用egg-easywebpack来初始化服务端渲染vue项目,坑已经被踩的差不多了,小伙伴们也可以尝试一下~
------------19.11.24-------------