vuejs / vue-hackernews-2.0

HackerNews clone built with Vue 2.0, vue-router & vuex, with server-side rendering
MIT License
10.96k stars 2.15k forks source link

throw error after update to aync branch #124

Closed JounQin closed 7 years ago

JounQin commented 7 years ago
error during render : /dist/e0114b42a3cebcf90428.hot-update.json
__vue_ssr_bundle__:1
(function (exports, require, module, __filename, __dirname) { [object Object]
                                                                      ^^^^^^
SyntaxError: Unexpected identifier
    at Object.exports.runInNewContext (vm.js:71:16)
    at /local/GitHub/vue-hackernews-2.0/node_modules/vue-server-renderer/build.js:6316:30
    at runInVm (/local/GitHub/vue-hackernews-2.0/node_modules/vue-server-renderer/build.js:6313:10)
    at Object.renderToStream (/local/GitHub/vue-hackernews-2.0/node_modules/vue-server-renderer/build.js:6344:9)
    at app.get (/local/GitHub/vue-hackernews-2.0/server.js:80:12)
    at Layer.handle [as handle_request] (/local/GitHub/vue-hackernews-2.0/node_modules/express/lib/router/layer.js:95:5)
    at next (/local/GitHub/vue-hackernews-2.0/node_modules/express/lib/router/route.js:131:13)
    at Route.dispatch (/local/GitHub/vue-hackernews-2.0/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/local/GitHub/vue-hackernews-2.0/node_modules/express/lib/router/layer.js:95:5)
    at /local/GitHub/vue-hackernews-2.0/node_modules/express/lib/router/index.js:277:22
    at param (/local/GitHub/vue-hackernews-2.0/node_modules/express/lib/router/index.js:349:14)
    at param (/local/GitHub/vue-hackernews-2.0/node_modules/express/lib/router/index.js:365:14)
    at Function.process_params (/local/GitHub/vue-hackernews-2.0/node_modules/express/lib/router/index.js:410:3)
    at next (/local/GitHub/vue-hackernews-2.0/node_modules/express/lib/router/index.js:271:10)
    at SendStream.error (/local/GitHub/vue-hackernews-2.0/node_modules/serve-static/index.js:121:7)
    at emitOne (events.js:96:13)

It also throws error in my own project vue-ssr with koa2 after update codes according to https://github.com/vuejs/vue-hackernews-2.0/commit/1b078be1f4fab6c908d849d488230e51aef922f0

yyx990803 commented 7 years ago

The branch relies on unreleased vue-server-renderer. Wait until it's released!

JounQin commented 7 years ago

Is there anywhere to get the unreleased vue-server-renderer for now? 😂

yyx990803 commented 7 years ago

You can build it yourself from vue/ssr branch