Ionic-framework: "export 'Ionic' was not found in '@ionic/vue'

Created on 25 Feb 2019  路  7Comments  路  Source: ionic-team/ionic-framework

Bug Report

Ionic version:
[x] 4.x

Current behavior:
When trying to load the Ionic plugin in a Vue project, I get the following error during the build process:

"export 'Ionic' was not found in '@ionic/vue'

Expected behavior:
I expected the instructions in the project README to work.

Steps to reproduce:

  1. Open an existing Vue.js project
  2. run npm install @ionic/vue --save
  3. add the following to main.js:
...
import Ionic from '@ionic/vue';

Vue.use(Ionic);
...
vue

Most helpful comment

Ah nm. Changing from:

import { Ionic } from '@ionic/vue';

to:

import Ionic from '@ionic/vue';

Fixed the error:

"export 'Ionic' was not found in '@ionic/vue'

All 7 comments

Ah, the difference was that I was using code from the introductory blog post:

...
import { Ionic } from '@ionic/vue';
...

The destructuring doesn't work now. Perhaps it would be good to update the blog post, as it is currently a primary way to find out about this project?

@brylie How did you fix this?

Ah nm. Changing from:

import { Ionic } from '@ionic/vue';

to:

import Ionic from '@ionic/vue';

Fixed the error:

"export 'Ionic' was not found in '@ionic/vue'

@brylie and @davidquon, yours fixed this error?

Check the version, @ionic/vue is 0.0.4 version, and here function:
import Ionic from '@ionic/vue'
Vue.use(Ionic)

Yeah what I posted in https://github.com/ionic-team/ionic/issues/17607#issuecomment-468487636 fixed the error for me. At the time I was using "@ionic/vue": "0.0.1" just as a proof of concept for using Vue with Ionic. Since then I see it's gone to Beta. 馃憤

Wow, this is incredible, @davidquon ...
@mhartington , I think this question can already be closed
This problem is solved.

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MrBokeh picture MrBokeh  路  3Comments

brandyscarney picture brandyscarney  路  3Comments

masimplo picture masimplo  路  3Comments

daveshirman picture daveshirman  路  3Comments

manucorporat picture manucorporat  路  3Comments