score:7
Accepted answer
you're using relative path. in your routes.js
, it should be
import poetry from '../components/poetry.vue'
import poetrycard from '../components/poetrydetails/poetrycard.vue'
import poetrysearch from '../components/poetrydetails/search.vue'
..
notation means go to parent folder.
if you're using webpack, you can add alias:
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
...
'@': resolve('src'), // your source folder
}
}
and then you can import:
import poetry from '@/components/poetry.vue'
import poetrycard from '@/components/poetrydetails/poetrycard.vue'
import poetrysearch from '@/components/poetrydetails/search.vue'
Source: stackoverflow.com
Related Query
- VueJS Module not found error while importing the components
- VueJS - Module not found issue while importing a component
- Dependency not found error while importing a file
- Importing lib's css inside the component styles is throwing dependency not found while it's installed
- Vue3 Jest module not found error while using store
- Module <rootDir>/node_modules/vue-jest in the transform option was not found
- Error while importing a module with optional chaining
- vuejs webpack relative modules were not found error
- What is the difference when importing components in computed and components in vuejs dynamic import?
- What is the purpose of Vue.use() while importing a plugin? If we have already used vue.use , is it required to add it to the components
- Why is my svg image not found while the url is correct?
- VueJs Module Not found Axios Post
- How to fix npm run serve command bringing Relative Module was not found error
- VueJS : Firebase throws error "FirebaseError: Messaging: A problem occurred while subscribing the user to FCM"
- Vue CLI Module Federation is component is not found in the Host App
- Error 'require' is not defined while trying to fetch my local json file in vuejs
- Webpack Imported Module is not a Constructor in VueJS when Importing Keycloak
- vuejs dynamic component throw error for v-bind:is, error is Property or method ... is not defined on the instance but referenced during render
- VueJS emitted event not getting caught by other components in the same hierarchy
- Go-Chi Fileserver Example Backend with VueJS Frontend Brings Error 404 Not Found When I Type A Route From Browser
- Injection "Symbol()" not found error Vuejs
- Sudden VueJS error: ERROR in multi vue, module not found: Error: Can't resolve 'vue' in
- this.$emit not working while passing the value from child to parent component in Vuejs
- Module Not Found error in Vue.js single page component using google maps
- The vue frontend I made fails to compile with one error saying "this relative module module was not found"
- How to solve the error while building a VueJS project?
- Vue.js unit tests error Module not found
- Vuejs Failed to compile with 1 errors Relative module not found
- Error while submitting the form data in vuejs
- Safari shows a component error while the other browsers do not
More Query from same tag
- Optional slug in dynamic route using a folder
- how to reference URL into Vue.Component.Template
- Vue 2 - Mutating props vue-warn
- Vuex - rawModule is undefined moving from single to multiple modules
- Why bottom alignment doesn't work in v-content?
- Vuejs does not update my interface, anyone know why?
- Add Font Style and font size in Vue2-editor
- Unable to retrieve TinyMCE's content from a parent component
- Filter input text to enter only number and not even decimal
- Vue.js : how to filter a table with a custom filter
- How to remove %20 and other special characters from a URL in NUXTJS?
- Vue.js with Rails not working
- Creating a one line group of inputs and button that needs to fit into parent div regardless of device size
- this.$store is undefined following example application structure
- How do I store my data in a custom Vue component instead of the root Vue instance?
- Creating a toggle/switch to show different information
- how to force clearing cache in chrome when release new Vue app version
- Can't add images to Vue.js component
- Any other ways besides a computed to store a Vue route param such that the reference cannot be modified
- VueJS select depending of another select
- Reusable component/mixin for a form that is disabled during submit in Vue
- How to use vue.js and firebase (directory-structure)
- vue.js: Dynamically add a reactive list of checkboxes based on API response
- VueJS change v-model variable from child
- Show markdown file in vuejs (markdown provided via backend link)
- Vue 1.0 -> 2.0 router.start Issue
- How to prevent Vue to interpreted custom tags?
- vue3-html2pdf generates blank pdf
- VueJS - get input values from a recursive tree
- How to render bound icons inside buttons?