Subscribe on changes!

no exported member 'ref'

avatar
Sep 14th 2021

Version

3.2.11

Reproduction link

github.com

Steps to reproduce

Use typescript.

import { App, Ref, ref } from 'vue'

Observe the error. Removing "Ref" and "ref" makes it work ("App" can be imported"). But importing either "ref" or "Ref" results in the error: Module '"../node_modules/vue/dist/vue"' has no exported member ...

This worked without problems in 3.1.1.

What is expected?

Should compile.

What is actually happening?

Reports error

avatar
Sep 15th 2021

Please reduce the reproduction to a smaller scope - ideally using https://sfc.vuejs.org.

avatar
Sep 16th 2021

Yes, please provide a minimal reproduction as required in the issue guidelines. We can't debug your actual projects.

avatar
Sep 17th 2021

Problem was caused by typescript compiler being too old (3.9.10). Upgrading to current (4.4.3) fixes it.

avatar
Sep 19th 2021

Well, thanks for the "thumbs up". I've pondered some time whether to add another comment. Here it is: I think the requirement for a higher typescript version should have been mentioned as a breaking change.

I don't know why google didn't show this one before (I did search before posting this issue), but obviously I'm not the only one who has spent time on this.

avatar
Jan 13th 2022

i update ts to 4.4.3, still has this warning,so bad!