Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improve errors #361

@MylesBorins

Description

@MylesBorins

Right now errors don't have details about source file, line number, example code, or stack trace.

current error:

SyntaxError: Unexpected token '==='

error in same code /w node.js

file:///Users/mylesborins/code/testjs/test.js:312
    results['dynamic import'] = typeof import === 'function';
                                              ^^^

SyntaxError: Unexpected token '==='
    at compileSourceTextModule (node:internal/modules/esm/utils:340:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102:18)
    at #translate (node:internal/modules/esm/loader:433:12)
    at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:480:27)
    at async ModuleJob._link (node:internal/modules/esm/module_job:112:19)

Node.js v22.11.0

Metadata

Metadata

Assignees

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