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

同一个node服务中创建两个createRenderer在不同路由执行时会报错,怎么解? #312

Open
shinelp100 opened this issue Feb 24, 2021 · 0 comments

Comments

@shinelp100
Copy link

想要在同一个node服务中针对不同路由规则渲染不同template模板(layout模板),于是创建两个createRenderer方法做缓存,但是只要有一个createRenderer 的执行后,另个一肯定会报错。如下:

renderer: TypeError: Cannot redefine property: $router at Function.defineProperty ()
0|pcsearch | at Function.X [as install] (server-bundle.js:2:142707)
0|pcsearch | at Function.Vue.use (/Users/yangjie/work/haodf/eureka/pcsearch/node_modules/vue/dist/vue.runtime.common.dev.js:5087:22)
0|pcsearch | at Object. (server-bundle.js:2:130989)
0|pcsearch | at n (server-bundle.js:2:124)
0|pcsearch | at Object. (server-bundle.js:2:111415)
0|pcsearch | at n (server-bundle.js:2:124)
0|pcsearch | at Object. (server-bundle.js:2:99009)
0|pcsearch | at n (server-bundle.js:2:124)
0|pcsearch | at Object. (server-bundle.js:2:98767)
0|pcsearch | at n (server-bundle.js:2:124)
0|pcsearch | at Object. (server-bundle.js:2:98461)
0|pcsearch | at n (server-bundle.js:2:124)
0|pcsearch | at server-bundle.js:2:1055
0|pcsearch | at Object. (server-bundle.js:2:1066)
0|pcsearch | at evaluateModule (/Users/yangjie/work/haodf/eureka/pcsearch/node_modules/vue-server-renderer/build.dev.js:9318:21)

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

1 participant