Skip to content

fileName should be normalized and absolute #1201

Open
@kevinmichaelchen

Description

@kevinmichaelchen

I guess index.d.ts isn't normalized?

Error message:

panic: fileName should be normalized and absolute: "/Users/kchen/dev/github.com/my-org/my-repo/node_modules/@types/../../@types/index.d.ts"

Source

Error possible comes from internal/ast/ast.go.

Stack Trace

panic: fileName should be normalized and absolute: "/Users/kchen/dev/github.com/AspiraVentures/aspira-nextgen/node_modules/@types/../../@types/index.d.ts"

goroutine 30 [running]:
github.com/microsoft/typescript-go/internal/ast.(*NodeFactory).NewSourceFile(0x14000190810, {0x14000265180, 0x304}, {0x140002c15e0, 0x65}, {0x140002bfcc0, 0x4b}, 0x14000426040)
github.com/microsoft/typescript-go/internal/ast/ast.go:10045 +0x1d0
github.com/microsoft/typescript-go/internal/parser.(*Parser).parseSourceFileWorker(0x14000190808)
github.com/microsoft/typescript-go/internal/parser/parser.go:330 +0xb4
github.com/microsoft/typescript-go/internal/parser.ParseSourceFile({0x140002c15e0, 0x65}, {0x140002bfcc0, 0x4b}, {0x14000265180, 0x304}, 0x14000026120, 0x14000213860, 0x2)
github.com/microsoft/typescript-go/internal/parser/parser.go:107 +0xd0
github.com/microsoft/typescript-go/internal/compiler.(*compilerHost).GetSourceFile(0x140000d6d10?, {0x140002c15e0, 0x65}, {0x140002bfcc0, 0x4b}, 0x14000026120, 0x14000213860)
github.com/microsoft/typescript-go/internal/compiler/host.go:101 +0xb0
github.com/microsoft/typescript-go/internal/compiler.(*fileLoader).parseSourceFile(0x140001e6e08, 0x1400025de30)
github.com/microsoft/typescript-go/internal/compiler/fileloader.go:281 +0x8c
github.com/microsoft/typescript-go/internal/compiler.(*parseTask).start(0x1400025de30, 0x140001e6e08)
github.com/microsoft/typescript-go/internal/compiler/parsetask.go:48 +0x134
github.com/microsoft/typescript-go/internal/compiler.(*fileLoaderWorker[...]).start.func1()
github.com/microsoft/typescript-go/internal/compiler/fileloadertask.go:35 +0x44
github.com/microsoft/typescript-go/internal/core.(*parallelWorkGroup).Queue.func1()
github.com/microsoft/typescript-go/internal/core/workgroup.go:39 +0x5c
created by github.com/microsoft/typescript-go/internal/core.(*parallelWorkGroup).Queue in goroutine 1
github.com/microsoft/typescript-go/internal/core/workgroup.go:37 +0x84

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions