Skip to content

TypeError: Cannot read properties of undefined (reading 'build') #390

@iki

Description

@iki

Any printing (or preview) attempt opens browser with

TypeError: Cannot read properties of undefined (reading 'build')
    at T.respond (...\.vscode-insiders\extensions\pdconsec.vscode-print-1.4.1\dist\extension.js:2:3870774)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Server.<anonymous> (...\.vscode-insiders\extensions\pdconsec.vscode-print-1.4.1\dist\extension.js:2:3856914)

However, there's no .build usage at that position, the closest before is at 2:3726775:

this.version.major,this.version.minor,this.version.build,this.version.subbuild

(however .major would fail first I guess)
and the first after is at 2:3899172

await this.pageBuilder.build();
return t.writeHead(200,{"Content-Type":"text/html; charset=utf-8","Content-Length":Buffer.byteLength(n,"utf-8")})

The error in log is:

2025-06-12 18:22:18 error: Content source could not be determined. "undefined" does not resolve to a file and there is no active editor.
2025-06-12 18:22:19 error: Cannot read properties of undefined (reading 'build')

Using VS Code Insiders 1.101.0 and pdconsec.vscode-print 1.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions