I'm setting up a new Vue.JS application using the Vue UI interface.
When I start the application using vue serve src/App.vue
the application starts but it only displays in the page the default Home | About
.
When I inspect the page in the HTML I see:
<noscript>
<strong>We're sorry but basicapp doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
and in the console I see
[Vue warn]: Unknown custom element: <router-link> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> <App> at src/App.vue
<Root>
I am working with the basic application created when running the Vue UI
I am working with the basic application created when running the Vue UI
If I run the application using the vue ui
command followed by starting the application from the Vue UI it works.
The reason I want to open the application using the command line is that in Cloud9 where I want to test the application the vue ui starts on localhost and I cannot find a way to open it. The only changes I made to the application files were done only to make the application run inside the Cloud9 container:
changed the package.json
added:
"dev": "webpack-dev-server --inline --progress --port 8080 --host 0.0.0.0 --config vue.config.js --public $C9_HOSTNAME",
created the vue.config.js
and added:
module.exports = {
devServer: {
compress: true,
disableHostCheck: true,
},
}
Vue({ render: h => h(App, Rating)}).$mount('#app').$mount('#app')
will launch the default app, but syntax likenew Vue({ el: '#app'})
won't. – Danialdaniala