Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I try to build my application the vue-scrollto gives me an error #546

Open
PatoGordo opened this issue Jun 13, 2021 · 4 comments
Open

Comments

@PatoGordo
Copy link

I'm using vitejs and typescript and when I try to build I get this error. I tried to reinstall @types/vue-scrollto, but this error persists.

Vue version: 3.0.5;
Vitejs version: 2.3.7;
Vue-scrollto version: 2.20.0;
typescript version: 4.3.2;

Error ⬇️

$ vue-tsc --noEmit && vite build
node_modules/vue-scrollto/vue-scrollto.d.ts:1:9 - error TS2305: Module '"vue"' has no exported member 'DirectiveOptions'.

1 import {DirectiveOptions, PluginObject} from "vue"
          ~~~~~~~~~~~~~~~~

node_modules/vue-scrollto/vue-scrollto.d.ts:1:27 - error TS2305: Module '"vue"' has no exported member 'PluginObject'.

1 import {DirectiveOptions, PluginObject} from "vue"
                            ~~~~~~~~~~~~


Found 2 errors.

error Command failed with exit code 2.
@rigor789
Copy link
Owner

The typings are for vue 2.x - you should probably exclude node_modules from type checking, or use skipLibCheck in your tsconfig.

I'm not quite sure what the best practice is when it comes to types that should work with both 2.x and 3.x - if anyone has ideas, please share, and a PR is more than welcome - as frankly I won't be able to work on the types in the near future.

@PatoGordo PatoGordo reopened this Jun 25, 2021
@Quineone
Copy link

Quineone commented Mar 7, 2022

hi @rigor789 , had better export the type ScrollToFunction and the interface ScrollOptions is lack of lazy on version ^2.20.0

@VisionYi
Copy link

I have the same issue. I set up skipLibCheck to true in tsconfig.json as the workaround.

@HydraCOREY
Copy link

hi @rigor789 , had better export the type ScrollToFunction and the interface ScrollOptions is lack of lazy on version ^2.20.0

Tried using both of these solutions. Neither work for me. Still getting the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants