single-spa / single-spa-vue

a single-spa plugin for vue.js applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Application not getting mounted to the provided el.

Sunil-Kudupudi-Albanero opened this issue · comments

Hello,
Recently I deployed all my apps,
prevously I haven't faced this issue before but from yesterday I am facing it

Details about issue are

my mounting element is provided through index.ejs file and all my react/vue applications One at a time will get mounted on to that element based on route,

problem here is react apps are mounting properly but my vue app is not getting mounted.

const vueLifecycles = singleSpaVue({
Vue,
appOptions: {
render: (h) => h(App),
el:'#mount'
},

});

this is my code where I am providing el to the app.

{
"name": "project",
"version": "0.1.0",
"private": true,
"scripts": {
"deploy": "npm install && npm run build && npm run serve",
"start": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"body-parser": "1.19.0",
"core-js": "3.6.5",
"regenerator-runtime": "0.13.5",
"single-spa-vue": "1.5.2",
"systemjs-webpack-interop": "1.2.1",
"vue": "2.6.11",
"vue-resource": "1.5.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.2.0",
"@vue/cli-plugin-eslint": "~4.2.0",
"@vue/cli-service": "~4.2.0",
"babel-eslint": "10.0.3",
"eslint": "6.7.2",
"eslint-plugin-vue": "6.1.2",
"vue-cli-plugin-single-spa": "~1.1.0",
"vue-template-compiler": "2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}

This is my package.json

Hi @Sunil-Kudupudi-Albanero, could you provide more detail about this? Where is the application being mounted when it's not going into the #mount container?

I found more information about this at https://single-spa.slack.com/archives/C8R6U7MT7/p1594839452290200.

The issue appears to be that you're reusing the same dom element between multiple single-spa applications. This is not supported and won't work. Instead, you should have a different dom element for each application.

Closing due to inactivity