Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

TypeError: selector is not a function

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

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
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
react, typescript, vite
Lĩnh vực
cli, frontend

Hướng nghiên cứu

Tái tạo ứng dụng được tạo bằng pnpm create @tanstack/start@latest, chọn Netlify cùng với AI, DB, Form và Query, sau đó chạy pnpm dev. Bắt đầu tại src/components/demo-AIAssistant.tsx:82 và lần theo lệnh gọi useStore đang thất bại trong quá trình server rendering; hoàn tất khi trang chủ mẫu tải được mà không có TypeError.

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

Mô tả

Which project does this relate to?

Start

Describe the bug

This is my first time trying out tanstack start and I run into an issue trying to run the app with pnpm dev.

I chose AI, DB, Form, Query and I also chose Netlify

Here are the logs:

Initially looks like everything is ok

❯ pnpm dev

> tanstack-experiments@ dev /Users/aalmacin/Projects/tanstack-experiments
> vite dev --port 3000

11:48:44 p.m. [vite] ⬥ Netlify Environment loaded
11:48:44 p.m. [vite] ⬥ Netlify Middleware loaded. Emulating features: aiGateway, blobs, edgeFunctions, environmentVariables, functions, geolocation, headers, images, redirects, static.
11:48:44 p.m. [vite] ⬥ Netlify 💭 Linking this project to a Netlify site lets you deploy your site, use any environment variables defined on your team and site and much more. Run npx netlify init to get started.

  VITE v7.3.1  ready in 1831 ms

  ➜  Local:   http://localhost:3000/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help

But I am getting {"status":500,"unhandled":true,"message":"HTTPError"} on the browser when I tried to open http://localhost:3000/. On the terminal it shows:

TypeError: selector is not a function
    at memoizedSelector (/Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:47:30)
    at /Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:76:26
    at Object.useSyncExternalStore (/Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server.node.development.js:10232:18)
    at process.env.NODE_ENV.exports.useSyncExternalStore (/Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react.development.js:1270:34)
    at process.env.NODE_ENV.exports.useSyncExternalStoreWithSelector (/Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:82:19)
    at useStore (/Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/@tanstack+react-store@0.9.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-store/src/useStore.ts:35:28)
    at AIAssistant (/Users/aalmacin/Projects/tanstack-experiments/src/components/demo-AIAssistant.tsx:82:18)
    at Object.react_stack_bottom_frame (/Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server.node.development.js:10288:18)
    at renderWithHooks (/Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server.node.development.js:5298:19)
    at renderElement (/Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server.node.development.js:5733:23)
TypeError: selector is not a function
    at memoizedSelector (/Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:47:30)
    ... 8 lines matching cause stack trace ...
    at renderElement (/Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server.node.development.js:5733:23) {
  cause: TypeError: selector is not a function
      at memoizedSelector (/Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:47:30)
      at /Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:76:26
      at Object.useSyncExternalStore (/Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server.node.development.js:10232:18)
      at process.env.NODE_ENV.exports.useSyncExternalStore (/Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react.development.js:1270:34)
      at process.env.NODE_ENV.exports.useSyncExternalStoreWithSelector (/Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:82:19)
      at useStore (/Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/@tanstack+react-store@0.9.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-store/src/useStore.ts:35:28)
      at AIAssistant (/Users/aalmacin/Projects/tanstack-experiments/src/components/demo-AIAssistant.tsx:82:18)
      at Object.react_stack_bottom_frame (/Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server.node.development.js:10288:18)
      at renderWithHooks (/Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server.node.development.js:5298:19)
      at renderElement (/Users/aalmacin/Projects/tanstack-experiments/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server.node.development.js:5733:23),
  status: 500,
  statusText: undefined,
  headers: undefined,
  data: undefined,
  body: undefined,
  unhandled: true
}
Your Example Website or App

https://github.com/aalmacin/tanstack-experiments

Steps to Reproduce the Bug or Issue

Commands:
Choose Netlify and AI, DB, Form, Query

pnpm create @tanstack/start@latest
pnpm dev
Expected behavior

As a new user, I expect to see the sample home page.

Screenshots or Videos

No response

Platform
  • Router / Start Version: latest
  • OS: MacOS Tahoe Version 26.3.1
  • Chip: Apple M4 Pro
  • Browser: Chrome
  • Browser Version: 145.0.7632.160
  • Bundler: vite
  • Bundler Version: 7.3.1
  • Node version: v23.11.0
Additional context

No response

Ngôn ngữ chính
TypeScript
Star
1.3k
Fork
185
Merge trung bình
18 giờ 45 phút
Pull request đã merge (30 ngày)
2

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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/cli

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

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.