Vuesax: Error on importing functions

Created on 7 Aug 2018  路  11Comments  路  Source: lusaxweb/vuesax

when i try to use
Vue.use(vsFunctions)

Error: Couldn't find preset "@vue/app" relative to directory

  • OS: Win10
  • Node -v: v8.11.3
  • Vuesax: 3.2.0
  • Browser Chrome 67.0.3396.99 x64
  • npm
bug

All 11 comments

@cristi200915 you could add all the js to see how you imported the library

import Vue from 'vue'
import Vuex from 'vuex'
import Vuesax from 'vuesax'
import vsFunctions from 'vuesax/dist/functions'
import 'vuesax/dist/vuesax.css'
import VueRouter from 'vue-router'

Vue.use(Vuex)
Vue.use(VueRouter)
Vue.use(Vuesax, {
    theme: {
        colors: {
            primary: 'rgb(96, 31, 255)',
            success: 'rgb(23, 201, 100)',
            danger: 'rgb(242, 19, 93)',
            warning: 'rgb(255, 130, 0)',
            dark: 'rgb(36, 33, 69)'
        }
    }
})
Vue.use(vsFunctions)

this is how i import the library

You could try removing the full Vuesax import to verify that the error is only in vsFunctions, thank you very much

```js
...
-- Vue.use(Vuesax, {
theme: {
colors: {
primary: 'rgb(96, 31, 255)',
success: 'rgb(23, 201, 100)',
danger: 'rgb(242, 19, 93)',
warning: 'rgb(255, 130, 0)',
dark: 'rgb(36, 33, 69)'
}
}
}) // delete this import and check if the error persists

...

Actually the error still without the full Vuesax import

I'm using Laravel Mix for compilation

I've finally solved removing the presest on vuesax package.json

"babel": {
"presets": [
"@vue/app"
]

@cristi200915 Does the error persist using the entire framework?

No @luisDanielRoviraContreras eveything is right

@cristi200915 then the problem is only when importing the functions independently I will review it to give you an answer at the moment just use vuesax completely, thank you very much

Still have the error?

I am getting an error similar to this one while trying to use the vsLoading individually

I have tried following ways to import just the loading component no other component.

  1. import vsLoading from 'vuesax/dist/functions/vsLoading
  2. import vsLoading from 'vuesax/dist/functions/vsLoading/index
  3. import {vsLoading} from 'vuesax/dist/functions

This is the error I am getting

Couldn't find preset "@vue/app" relative to directory <my project directory>/node_modules\vuesax

How can I fix this ?

Thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mjmnagy picture mjmnagy  路  3Comments

Deltalus picture Deltalus  路  3Comments

bigperson picture bigperson  路  3Comments

jsinhSolanki picture jsinhSolanki  路  3Comments

webafra picture webafra  路  3Comments