Skip to content

[BUG] Sourcemap load errors in debugger from @nevware21 dependencies #2424

@johncrim

Description

@johncrim

Description/Screenshot

Every time I run Angular apps in a debugger, with app insights dependencies, I get a long spew of source map failure lines, like

image

This is not impacting runtime behavior, but it is a large amount of warnings/errors that can obscure useful errors. This occurs both in browsers and VS Code debuggers.

Some of the text:

Could not read source map for file:///C:/src/co/webui/node_modules/%40nevware21/ts-async/build/es5/mod/internal/constants.js: ENOENT: no such file or directory, open 'c:\src\co\webui\node_modules\@nevware21\ts-async\build\es5\mod\internal\constants.js.map'
Could not read source map for file:///C:/src/co/webui/node_modules/%40nevware21/ts-async/build/es5/mod/promise/await.js: ENOENT: no such file or directory, open 'c:\src\co\webui\node_modules\@nevware21\ts-async\build\es5\mod\promise\await.js.map'
Could not read source map for file:///C:/src/co/webui/node_modules/%40nevware21/ts-async/build/es5/mod/promise/debug.js: ENOENT: no such file or directory, open 'c:\src\co\webui\node_modules\@nevware21\ts-async\build\es5\mod\promise\debug.js.map'
Could not read source map for file:///C:/src/co/webui/node_modules/%40nevware21/ts-async/build/es5/mod/internal/state.js: ENOENT: no such file or directory, open 'c:\src\co\webui\node_modules\@nevware21\ts-async\build\es5\mod\internal\state.js.map'
Could not read source map for file:///C:/src/co/webui/node_modules/%40nevware21/ts-async/build/es5/mod/promise/event.js: ENOENT: no such file or directory, open 'c:\src\co\webui\node_modules\@nevware21\ts-async\build\es5\mod\promise\event.js.map'
Could not read source map for file:///C:/src/co/webui/node_modules/%40nevware21/ts-async/build/es5/mod/promise/base.js: ENOENT: no such file or directory, open 'c:\src\co\webui\node_modules\@nevware21\ts-async\build\es5\mod\promise\base.js.map'
... (then more in ts-utils)
Could not read source map for file:///C:/src/co/webui/node_modules/%40nevware21/ts-utils/build/es5/mod/internal/constants.js: ENOENT: no such file or directory, open 'c:\src\co\webui\node_modules\@nevware21\ts-utils\build\es5\mod\internal\constants.js.map'
Could not read source map for file:///C:/src/co/webui/node_modules/%40nevware21/ts-utils/build/es5/mod/helpers/safe.js: ENOENT: no such file or directory, open 'c:\src\co\webui\node_modules\@nevware21\ts-utils\build\es5\mod\helpers\safe.js.map'
Could not read source map for file:///C:/src/co/webui/node_modules/%40nevware21/ts-utils/build/es5/mod/helpers/safe_get.js: ENOENT: no such file or directory, open 'c:\src\co\webui\node_modules\@nevware21\ts-utils\build\es5\mod\helpers\safe_get.js.map'

There are about 100 lines of such errors each time the app is started in the debugger.

Steps to Reproduce

Angular starter project, including and using dependency:

    "@microsoft/applicationinsights-web": "^3.3.2",
  • OS/Browser: Windows 11, VS Code Version: 1.93.1
    OS: Windows_NT x64 10.0.22631
  • SDK Version [e.g. 22]: 3.3.2
  • How you initialized the SDK: irrelevant - the files just need to be linked

Expected behavior
No errors and sourcemaps working.

Additional context

Note that the issue isn't that the @ char is escaped to %40 - the issue is that the /build/ dir isn't present in the @nevware21\ts-async and @nevware21\ts-utils packages.

For example, the @nevware21\ts-async\bundle\es5\ts-polyfills-async.js.map file contains this:

{"version":3,"file":"ts-polyfills-async.js","sources":[
"../../../common/temp/node_modules/@nevware21/ts-utils/dist/es5/mod/ts-utils.js",
"../../build/es5/mod/internal/constants.js","../../build/es5/mod/promise/await.js",
"../../build/es5/mod/internal/state.js","../../build/es5/mod/promise/event.js",
"../../build/es5/mod/promise/base.js","../../build/es5/mod/promise/itemProcessor.js",
"../../build/es5/mod/promise/asyncPromise.js","../../build/es5/mod/polyfills/promise.js",
"../../build/es5/mod/polyfills.js"
],
"sourcesContent":["/*! https://github.com/nevware21/ts-utils v0.11.3 */\n/*\n * Copyright (c) NevWare21 Solutions LLC and contributors. All rights reserved.\n *

which I believe is the source of the incorrect reference to the build dir for the sourcemaps.

Sub-issues

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions