I am trying to implement ssr and I get the following error:
ERROR Failed to compile with 1 error 16:11:16
This dependency was not found:
* module in ./node_modules/vue-server-renderer/build.dev.js
To install it, you can run: npm install --save module
In the main.js file I have the following code:
const app = new Vue({
i18n,
router: routerInstance,
render: h => h(App),
}).$mount('#app')
const renderer = require('vue-server-renderer').createRenderer({
template: require('fs').readFileSync('./index.template.html', 'utf-8')
})
renderer.renderToString(app, (err, html) => {
console.log(html) // will be the full page with app content injected.
})
Any ideas? Thank you
