Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running SSR Server does not work with Typescript

See original GitHub issue

I’m evaluating this plugin to use with a Vue-CLI project created with Typescript.

Repro steps: vue create new-project vue add @vue/typescript vue add @akryum/ssr npm run ssr:serve

Result: When opening localhost:8000, I get an error from the server on initial render: TypeError: runner is not a function.

Expected Result: Example app renders as expected.

Let me know if this is on the radar already? I’m pretty interested in this project so I would be happy to attempt to contribute a solution to this issue.

demo repo:

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:13
  • Comments:23 (7 by maintainers)

github_iconTop GitHub Comments

nether-catcommented, Jun 3, 2019

I’ve managed to come up with a solution. This whole Vue CLI + webpack configuration topic could be even better documented than it already is… The thing with the changes in a4ee8e4 is, that the plugin is adopting the “new” chainWebpack API there, which actually makes things a lot easier and at least opens up many possibilities to plugin developers in general.

What’s bad is that by default the chainWebpack hooks from @vue/cli-plugin-typescript run later than the ones from this plugin, given that they are both listed in the same group of dependencies in package.json, while dependencies run after devDependencies. One can change the alphabetical order by hand, which I did and my issue was immediately gone. Under circumstances the Vue’s typescript plugin overrides the critical option with its default value ./src/main.ts.

–> responsible lines of code here.

Akryumcommented, Jun 6, 2019

Plugin ordering is on our radar for v4

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 11 SSR is compiled,but having issue with prod ...
The compiled SSR code available at node dist/new-asasa/server/main.js is just application code. If you try to run it directly using Node, it ...
Read more >
Fullstack TypeScript: Node.js + React SSR
In this post I'll show you how to setup a fullstack TypeScript web application project that uses Node.js and React with server-side ...
Read more >
Vue 3 Server Side Rendering (SSR)
A guide to building and running a server-side rendered Vue 3 application in a Node environment with routing, state, and meta.
Read more >
Creating Server-side Rendered Vue.js Apps Using Nuxt.js
Another important thing to note is Nuxt doesn't have to be used for SSR. ... Then we just need to install dependencies and...
Read more >
Advanced Features: Custom Server
server.js doesn't go through babel or webpack. Make sure the syntax and sources this file requires are compatible with the current node version...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found