create folder in page : page\admin



  • Hello friends, since I am new to this, and I would like your help, but what is the correct procedure, create a folder within the pages and create a .vue page, since when registering in the router it gives errors

    pages.jpg

    the error:

     ERROR  Failed to compile with 1 errors                                                                                                                                                        13:51:32
    This relative module was not found:
    
    * ../boot/axios in ./node_modules/babel-loader/lib??ref--1-0!./node_modules/@quasar/app/lib/webpack/loader.auto-import.js?kebab!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/admin/UserSearch.vue?vue&type=script&lang=js&
    

    or everything must be contained within page

    best regards



  • In theory it should work. This is exactly how I have it working and I didn’t need to do anything special.

    A route in my case in router.js

    { path: 'herbs', components: { default: () => import('pages/herbs/herbs.vue'), left_drawer: () => import('pages/herbs/herbs_filters.vue') } },
    


  • @eloy-silva
    Look at the error message :

    This relative module was not found:

    • …/boot/axios

    It is looking for a ../boot/axios module relative to the current working directory, which is in your case pages/admin

    So, either import ../../boot/axios, or use the quasar’s defined src alias importing src/boot/axios



  • @tof06
    Thanks

    is correct
    import { axiosInstance } from “…/…/boot/axios”;



  • you don’t need to use relative path, boot folder is registered as an alias already. 'boot/axios' is enough.


Log in to reply