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

Jsonwebtoken don't support verbatimModuleSyntax typescript compiler option

Đang mở
#942 0 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
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
nodejs, typescript, vite
Lĩnh vực
backend, build-system

Hướng nghiên cứu

Bắt đầu với bản tái hiện Vite, bao gồm mains.ts và tsconfig.json mở rộng @vue/tsconfig/tsconfig.dom.json, rồi chạy npm dev với verbatimModuleSyntax được bật. Theo dõi import decode từ jsonwebtoken và xác minh rằng lỗi runtime không còn xảy ra với các phiên bản package được liệt kê.

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

Mô tả

Description

When the verbatimModuleSyntax typescript compiler option is set to true, the import of jsonwebtoken raise an error on runtime Cannot read properties of undefined (reading 'from')

In my tsconfig.json file, I extend the @vue/tsconfig/tsconfig.dom.json file. The verbatimModuleSyntax comes from here.

Reproduction
  • Create a new project with Vite with Vue
  • import jsonwebtoken @types/jsonwebtoken @vue/tsconfig librairies
  • In the mains.ts file, add import { decode } from "jsonwebtoken";
  • In tsconfig.json file, add "extends": "@vue/tsconfig/tsconfig.dom.json"
  • Run npm dev
Environment

package.json

{
  "name": "vite-project",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vue-tsc && vite build",
    "preview": "vite preview"
  },
  "dependencies": {
    "@types/jsonwebtoken": "^9.0.3",
    "@vue/tsconfig": "^0.4.0",
    "jsonwebtoken": "^9.0.2",
    "vue": "^3.3.4"
  },
  "devDependencies": {
    "@vitejs/plugin-vue": "^4.2.3",
    "typescript": "^5.0.2",
    "vite": "^4.4.5",
    "vue-tsc": "^1.8.5"
  }
}
Ngôn ngữ chính
JavaScript
Star
18.2k
Fork
1.3k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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 auth0/node-jsonwebtoken

Tất cả issue của auth0/node-jsonwebtoken

Issue tương tự

Thêm issue về JavaScript

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.