AustinGil / vuetensils

🍴 A tasty toolset for Vue.js 🛠 - Lightweight, functional components to boost your next project.
https://vuetensils.austingil.com/
MIT License
660 stars 38 forks source link

Vuetensils: TypeError: Object(...) is not a function #143

Closed bmcalees closed 2 years ago

bmcalees commented 2 years ago

Upgrading from 9.3 -> 10.7 is giving the following error across all pages of the project. Any idea what could cause this?

image

AustinGil commented 2 years ago

Not the most obvious error, but looking at the source, like 113 of the dist file references a function that is related to VAlert. Can you share how you're using it?

Or better yet, can you create a reproduction of the issue in CodeSandbox?

bmcalees commented 2 years ago

Not the most obvious error, but looking at the source, like 113 of the dist file references a function that is related to VAlert. Can you share how you're using it?

Or better yet, can you create a reproduction of the issue in CodeSandbox?

I noticed that as well and we're actually not using VAlert anywhere in the codebase which is why I was also confused. This is the RevealBio codebase btw. I'll try to throw together a codepen to reproduce the issue!

AustinGil commented 2 years ago

You might also try the latest version, 0.11.0.

bmcalees commented 2 years ago

0.11.0 was broken too.

It looks like we're doing some form of global component registration which I don't see referenced anywhere in the docs.

image

Importing Vuetensils is what causes everything to break.

Importing the components as shown in the docs seems to make everything work fine again!

image

I'm going to close this issue.

AustinGil commented 2 years ago

Huh, that's weird. It should actually now support multiple ways of registering global components including your example. I made a demo that shows it working

https://codesandbox.io/s/pensive-andras-hs4bzx?file=/src/main.js

Anyway, I'm glad you have it sorted.