T
T
Tdvist2020-11-09 20:09:23
Vue.js
Tdvist, 2020-11-09 20:09:23

Why is Vue not being imported?

I realize the question is possibly stupid BUT
When importing vue for vue router

import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)


Doesn't find vue, although the correct path is highlighted.

Used vue-cli.

When building, npm run serve says: ""export 'default' (imported as 'Vue') was not found in 'vue'"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2020-11-11
@Aetae

At your address 'vue', obviously, is not Vue. I will assume that you have an vue.config.jsalias in vue: что-то.
Do:

import * as all from 'vue'
console.log(all)
and see what you really have there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question