Not able to use svelte-virtual in sveltekit project (typescript)

Đang mở
#564 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript, vite
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu với bản tái hiện StackBlitz được liên kết và src/routes/+page.svelte, sau đó cài đặt @tanstack/svelte-virtual ở phiên bản 3.0.0.beta.12 và chạy import được hiển thị trong issue. Theo dõi lý do bản build SSR không thể resolve ../../virtual-core/build/esm/index.js; hoàn thành khi dự án TypeScript SvelteKit import thành công mà không gặp lỗi module của Vite.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Describe the bug

Facing the below error while trying to import in a svelte-kit project written in typescript. I installed svelte-virtual using pnpm. Please help.

22:26:53 [vite] Error when evaluating SSR module /src/routes/dashboard/+page.svelte: failed to import "@tanstack/svelte-virtual"
|- Error: Cannot find module '../../virtual-core/build/esm/index.js'

Your minimal, reproducible example

https://stackblitz.com/edit/github-r5vxpy?file=src%2Froutes%2F%2Bpage.svelte

Steps to reproduce

Just install and import using
import { createVirtualizer } from '@tanstack/svelte-virtual';

Expected behavior

This error should not be shown.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

stackblitz, microsoft edge

tanstack-virtual version

3.0.0.beta.12

TypeScript version

5.0.0

Additional context

No response

Terms & Code of Conduct
  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
Ngôn ngữ chính
TypeScript
Star
7.2k
Fork
495
Merge trung bình
23 giờ 16 phút
Pull request đã merge (30 ngày)
19

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TanStack/virtual

Tất cả issue của TanStack/virtual

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.