Skip to content

Runtime error compiling expo #870

@DanielRosenwasser

Description

@DanielRosenwasser
git clone https://github.com/expo/expo --filter=blob:none
cd expo

No need to run yarn. Then:

/path/to/typescript-go/built/local/tsgo.exe -p . --extendedDiagnostics
panic: runtime error: slice bounds out of range [1:0]

goroutine 11831 [running]:
github.com/microsoft/typescript-go/internal/core.(*Pattern).Matches(...)
        D:/typescript-go/internal/core/pattern.go:28
github.com/microsoft/typescript-go/internal/core.FindBestPatternMatch[...]({0x4023f8b180?, 0xb, 0xc}, 0x7ff7ba1de310?, {0x4009e72cd0, 0xc})
        D:/typescript-go/internal/core/pattern.go:46 +0x208
github.com/microsoft/typescript-go/internal/checker.(*Checker).resolveExternalModule(0x402c941008, 0x400d9a2a20, {0x4009e72cd0, 0xc}, 0x0, 0x400d9a2a20, 0x7?)
        D:/typescript-go/internal/checker/checker.go:14299 +0x204
github.com/microsoft/typescript-go/internal/checker.(*Checker).resolveExternalModuleNameWorker(0x402c941008, 0x400d9a2a20, 0x400d9a2a20, 0x0, 0x0, 0x1)
        D:/typescript-go/internal/checker/checker.go:14271 +0x80
github.com/microsoft/typescript-go/internal/checker.(*Checker).mergeModuleAugmentation(0x402c941008, 0x400d9a2a20)
        D:/typescript-go/internal/checker/checker.go:1297 +0xc8
github.com/microsoft/typescript-go/internal/checker.(*Checker).initializeChecker(0x402c941008)
        D:/typescript-go/internal/checker/checker.go:1273 +0x938
github.com/microsoft/typescript-go/internal/checker.NewChecker({0x7ff7ba2a2058, 0x4000140000})
        D:/typescript-go/internal/checker/checker.go:1036 +0x6300
github.com/microsoft/typescript-go/internal/compiler.(*Program).createCheckers.func1.1()
        D:/typescript-go/internal/compiler/program.go:233 +0x30
github.com/microsoft/typescript-go/internal/core.(*parallelWorkGroup).Queue.func1()
        D:/typescript-go/internal/core/workgroup.go:39 +0x50
created by github.com/microsoft/typescript-go/internal/core.(*parallelWorkGroup).Queue in goroutine 11679
        D:/typescript-go/internal/core/workgroup.go:37 +0x7c
panic: runtime error: slice bounds out of range [1:0]

goroutine 11832 [running]:
github.com/microsoft/typescript-go/internal/core.(*Pattern).Matches(...)
        D:/typescript-go/internal/core/pattern.go:28
github.com/microsoft/typescript-go/internal/core.FindBestPatternMatch[...]({0x4023915d60?, 0xb, 0xc}, 0x7ff7ba1de310?, {0x4009e72cd0, 0xc})
        D:/typescript-go/internal/core/pattern.go:46 +0x208
github.com/microsoft/typescript-go/internal/checker.(*Checker).resolveExternalModule(0x402c2cb008, 0x400d9a2a20, {0x4009e72cd0, 0xc}, 0x0, 0x400d9a2a20, 0x7?)
        D:/typescript-go/internal/checker/checker.go:14299 +0x204
github.com/microsoft/typescript-go/internal/checker.(*Checker).resolveExternalModuleNameWorker(0x402c2cb008, 0x400d9a2a20, 0x400d9a2a20, 0x0, 0x0, 0x1)
        D:/typescript-go/internal/checker/checker.go:14271 +0x80
github.com/microsoft/typescript-go/internal/checker.(*Checker).mergeModuleAugmentation(0x402c2cb008, 0x400d9a2a20)
        D:/typescript-go/internal/checker/checker.go:1297 +0xc8
github.com/microsoft/typescript-go/internal/checker.(*Checker).initializeChecker(0x402c2cb008)
        D:/typescript-go/internal/checker/checker.go:1273 +0x938
github.com/microsoft/typescript-go/internal/checker.NewChecker({0x7ff7ba2a2058, 0x4000140000})
        D:/typescript-go/internal/checker/checker.go:1036 +0x6300
github.com/microsoft/typescript-go/internal/compiler.(*Program).createCheckers.func1.1()
        D:/typescript-go/internal/compiler/program.go:233 +0x30
github.com/microsoft/typescript-go/internal/core.(*parallelWorkGroup).Queue.func1()
        D:/typescript-go/internal/core/workgroup.go:39 +0x50
created by github.com/microsoft/typescript-go/internal/core.(*parallelWorkGroup).Queue in goroutine 11679
        D:/typescript-go/internal/core/workgroup.go:37 +0x7c

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions