"Output generation failed" when transpiling "test.d.abc.ts"
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- compilers
Hướng nghiên cứu
Bắt đầu với reproduction của TS.transpileModule trong issue, sử dụng tên tệp test.d.tsp.ts và các phiên bản TypeScript được nêu. So sánh đường dẫn tạo output bị lỗi với phiên bản cũ hoạt động thành công, đồng thời thêm regression test cho các tên tệp chứa .d.; được xem là hoàn tất khi việc transpilation thành công với output và không xảy ra crash.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
🔎 Search Terms
"Output generation failed", "transpileModule"
🕗 Version & Regression Information
- This is a crash
- This changed between versions 5.0.0-dev.20230109 and 5.0.0-dev.20230110
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about file names
⏯ Playground Link
No response
💻 Code
const TS = require('typescript')
const res = TS.transpileModule('export const x = 6;', {
fileName: 'test.d.tsp.ts',
});
console.log(res)
🙁 Actual behavior
The Typescript compiler crashes. The compiler should allow files that contain .d. in their name.
🙂 Expected behavior
The compilation succeeds
Additional information about the issue
c:\Users\osv\Downloads\test>npm i typescript@5.0.0-dev.20230110
changed 1 package, and audited 2 packages in 5s
found 0 vulnerabilities
c:\Users\osv\Downloads\test>node main.js
c:\Users\osv\Downloads\test\node_modules\typescript\lib\typescript.js:1772
throw e;
^
Error: Debug Failure. Output generation failed
at Object.transpileModule (c:\Users\osv\Downloads\test\node_modules\typescript\lib\typescript.js:127318:20)
at Object.<anonymous> (c:\Users\osv\Downloads\test\main.js:3:16)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49
Node.js v20.11.1
c:\Users\osv\Downloads\test>npm i typescript@5.0.0-dev.20230109
changed 1 package, and audited 2 packages in 745ms
found 0 vulnerabilities
c:\Users\osv\Downloads\test>node main.js
{
outputText: '"use strict";\r\n' +
'Object.defineProperty(exports, "__esModule", { value: true });\r\n' +
'exports.x = void 0;\r\n' +
'exports.x = 6;\r\n',
diagnostics: [],
sourceMapText: undefined
}
- Ngôn ngữ chính
- Go
- Star
- 111k
- Fork
- 14.4k
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 117
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/TypeScript
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
microsoft/TypeScript#64322 · 2 bình luận · 1 reaction · 2 người được giao ·
-
Possible Improvement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/TypeScript#64278 · 1 bình luận · 1 reaction ·
-
Docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
microsoft/TypeScript#64118 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
microsoft/TypeScript#64094 ·
-
Docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
microsoft/TypeScript#63959 · 5 bình luận ·
Tất cả issue của microsoft/TypeScript
Issue tương tự
-
optimization optimization:agents-md-curator
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
githubnext/gh-aw-cao#13143 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
blinklabs-io/bursa#904 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 bình luận ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100