microsoft / ApplicationInsights-node.js-native-metrics

Native Metrics Agent for the Application Insights Node.js SDK
MIT License
5 stars 11 forks source link

Module parse failed: Unexpected character '�' #34

Open alikazai opened 2 years ago

alikazai commented 2 years ago

i have added the native metrics package but keep getting this error when running angular. i have tried version 0.0.6 and the latest 0.0.7 but same error

image

i have tried adding opentelemetrics , updating application insights packages but same error, no matter what i change.

i have also tried this in node v 12.21.0 and 14.15.0 both come back with the same error.

look forward to some help thanks

MikeMoolenaar commented 2 years ago

Same issue here, would love some help as well.

jiri-thiemel-te commented 1 year ago

Hi,

This is happening on PCs when it's required in an error boundary handler, eg. like this:

export function trackException(error: Error) {
  ...
  const appInsights = require('applicationinsights');
  appInsights.defaultClient.trackException({ exception: error });
  ...
}

Then Storybook fails with the following:

ERROR in ./node_modules/applicationinsights-native-metrics/build/Release/native_metrics.node 1:2
Module parse failed: Unexpected character '�' (1:2)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
ERROR in ./node_modules/applicationinsights/out/AutoCollection/HeartBeat.js 3:9-22
Module not found: Error: Can't resolve 'os' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\AutoCollection'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "os": require.resolve("os-browserify/browser") }'
    - install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "os": false }
ERROR in ./node_modules/applicationinsights/out/AutoCollection/HttpDependencies.js 9:11-26
Module not found: Error: Can't resolve 'http' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\AutoCollection'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
    - install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "http": false }
ERROR in ./node_modules/applicationinsights/out/AutoCollection/HttpDependencies.js 10:12-28
Module not found: Error: Can't resolve 'https' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\AutoCollection'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "https": require.resolve("https-browserify") }'
    - install 'https-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "https": false }
ERROR in ./node_modules/applicationinsights/out/AutoCollection/HttpDependencyParser.js 15:10-24
Module not found: Error: Can't resolve 'url' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\AutoCollection'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
    - install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "url": false }
ERROR in ./node_modules/applicationinsights/out/AutoCollection/HttpRequestParser.js 15:10-24
Module not found: Error: Can't resolve 'url' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\AutoCollection'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
    - install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "url": false }
ERROR in ./node_modules/applicationinsights/out/AutoCollection/HttpRequests.js 2:11-26
Module not found: Error: Can't resolve 'http' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\AutoCollection'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
    - install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "http": false }
ERROR in ./node_modules/applicationinsights/out/AutoCollection/HttpRequests.js 3:12-28
Module not found: Error: Can't resolve 'https' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\AutoCollection'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "https": require.resolve("https-browserify") }'
    - install 'https-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "https": false }
ERROR in ./node_modules/applicationinsights/out/AutoCollection/Performance.js 2:9-22
Module not found: Error: Can't resolve 'os' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\AutoCollection'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "os": require.resolve("os-browserify/browser") }'
    - install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "os": false }
ERROR in ./node_modules/applicationinsights/out/AutoCollection/Statsbeat.js 49:9-22
Module not found: Error: Can't resolve 'os' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\AutoCollection'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "os": require.resolve("os-browserify/browser") }'
    - install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "os": false }
ERROR in ./node_modules/applicationinsights/out/AutoCollection/WebSnippet.js 2:11-26
Module not found: Error: Can't resolve 'http' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\AutoCollection'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
    - install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "http": false }
ERROR in ./node_modules/applicationinsights/out/AutoCollection/WebSnippet.js 3:12-28
Module not found: Error: Can't resolve 'https' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\AutoCollection'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "https": require.resolve("https-browserify") }'
    - install 'https-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "https": false }
ERROR in ./node_modules/applicationinsights/out/AutoCollection/WebSnippet.js 4:11-26
Module not found: Error: Can't resolve 'zlib' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\AutoCollection'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "zlib": require.resolve("browserify-zlib") }'
    - install 'browserify-zlib'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "zlib": false }
ERROR in ./node_modules/applicationinsights/out/AutoCollection/diagnostic-channel/SpanParser.js 6:12-26
Module not found: Error: Can't resolve 'url' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\AutoCollection\diagnostic-channel'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
    - install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "url": false }
ERROR in ./node_modules/applicationinsights/out/Library/Config.js 6:10-24
Module not found: Error: Can't resolve 'url' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
    - install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "url": false }
ERROR in ./node_modules/applicationinsights/out/Library/Context.js 2:9-22
Module not found: Error: Can't resolve 'os' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "os": require.resolve("os-browserify/browser") }'
    - install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "os": false }
ERROR in ./node_modules/applicationinsights/out/Library/Context.js 3:9-22
Module not found: Error: Can't resolve 'fs' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'
ERROR in ./node_modules/applicationinsights/out/Library/FileAccessControl.js 40:9-22
Module not found: Error: Can't resolve 'fs' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'
ERROR in ./node_modules/applicationinsights/out/Library/FileAccessControl.js 41:9-22
Module not found: Error: Can't resolve 'os' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "os": require.resolve("os-browserify/browser") }'
    - install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "os": false }
ERROR in ./node_modules/applicationinsights/out/Library/FileAccessControl.js 42:20-44
Module not found: Error: Can't resolve 'child_process' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'
ERROR in ./node_modules/applicationinsights/out/Library/FileSystemHelper.js 40:9-22
Module not found: Error: Can't resolve 'fs' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'
ERROR in ./node_modules/applicationinsights/out/Library/InternalAzureLogger.js 45:9-22
Module not found: Error: Can't resolve 'fs' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'
ERROR in ./node_modules/applicationinsights/out/Library/InternalAzureLogger.js 46:9-22
Module not found: Error: Can't resolve 'os' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "os": require.resolve("os-browserify/browser") }'
    - install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "os": false }
ERROR in ./node_modules/applicationinsights/out/Library/JsonConfig.js 4:9-22
Module not found: Error: Can't resolve 'fs' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'
ERROR in ./node_modules/applicationinsights/out/Library/QuickPulseEnvelopeFactory.js 13:9-22
Module not found: Error: Can't resolve 'os' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "os": require.resolve("os-browserify/browser") }'
    - install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "os": false }
ERROR in ./node_modules/applicationinsights/out/Library/QuickPulseSender.js 38:12-28
Module not found: Error: Can't resolve 'https' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "https": require.resolve("https-browserify") }'
    - install 'https-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "https": false }
ERROR in ./node_modules/applicationinsights/out/Library/QuickPulseSender.js 43:10-24
Module not found: Error: Can't resolve 'url' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
    - install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "url": false }
ERROR in ./node_modules/applicationinsights/out/Library/Sender.js 38:9-22
Module not found: Error: Can't resolve 'fs' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'
ERROR in ./node_modules/applicationinsights/out/Library/Sender.js 39:9-22
Module not found: Error: Can't resolve 'os' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "os": require.resolve("os-browserify/browser") }'
    - install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "os": false }
ERROR in ./node_modules/applicationinsights/out/Library/Sender.js 41:11-26
Module not found: Error: Can't resolve 'zlib' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "zlib": require.resolve("browserify-zlib") }'
    - install 'browserify-zlib'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "zlib": false }
ERROR in ./node_modules/applicationinsights/out/Library/Sender.js 46:12-26
Module not found: Error: Can't resolve 'url' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
    - install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "url": false }
ERROR in ./node_modules/applicationinsights/out/Library/SnippetInjectionHelper.js 4:11-26
Module not found: Error: Can't resolve 'zlib' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "zlib": require.resolve("browserify-zlib") }'
    - install 'browserify-zlib'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "zlib": false }
ERROR in ./node_modules/applicationinsights/out/Library/TelemetryClient.js 2:10-24
Module not found: Error: Can't resolve 'url' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
    - install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "url": false }
ERROR in ./node_modules/applicationinsights/out/Library/Util.js 13:11-26
Module not found: Error: Can't resolve 'http' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
    - install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "http": false }
ERROR in ./node_modules/applicationinsights/out/Library/Util.js 14:12-28
Module not found: Error: Can't resolve 'https' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "https": require.resolve("https-browserify") }'
    - install 'https-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "https": false }
ERROR in ./node_modules/applicationinsights/out/Library/Util.js 15:10-24
Module not found: Error: Can't resolve 'url' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
    - install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "url": false }
ERROR in ./node_modules/applicationinsights/out/Library/Util.js 16:16-36
Module not found: Error: Can't resolve 'constants' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\applicationinsights\out\Library'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "constants": require.resolve("constants-browserify") }'
    - install 'constants-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "constants": false }
ERROR in ./node_modules/async-hook-jl/patches/timers.js 3:15-32
Module not found: Error: Can't resolve 'timers' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\async-hook-jl\patches'
Did you mean './timers'?
Requests that should resolve in the current directory need to start with './'.
Requests that start with a name are treated as module requests and resolve within module directories (node_modules).
If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "timers": require.resolve("timers-browserify") }'
    - install 'timers-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "timers": false }
ERROR in ./node_modules/async-listener/index.js 18:10-24
Module not found: Error: Can't resolve 'net' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\async-listener'
ERROR in ./node_modules/async-listener/index.js 144:11-26
Module not found: Error: Can't resolve 'http' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\async-listener'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
    - install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "http": false }
ERROR in ./node_modules/async-listener/index.js 161:19-43
Module not found: Error: Can't resolve 'child_process' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\async-listener'
ERROR in ./node_modules/async-listener/index.js 223:13-30
Module not found: Error: Can't resolve 'timers' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\async-listener'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "timers": require.resolve("timers-browserify") }'
    - install 'timers-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "timers": false }
ERROR in ./node_modules/async-listener/index.js 240:10-24
Module not found: Error: Can't resolve 'dns' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\async-listener'
ERROR in ./node_modules/async-listener/index.js 260:9-22
Module not found: Error: Can't resolve 'fs' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\async-listener'
ERROR in ./node_modules/cls-hooked/context.js 7:20-42
Module not found: Error: Can't resolve 'async_hooks' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\cls-hooked'
ERROR in ./node_modules/diagnostic-channel-publishers/dist/src/console.pub.js 7:15-32
Module not found: Error: Can't resolve 'stream' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\diagnostic-channel-publishers\dist\src'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
    - install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "stream": false }
ERROR in ./node_modules/diagnostic-channel-publishers/dist/src/console.pub.js 61:4-22
Module not found: Error: Can't resolve 'console' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\diagnostic-channel-publishers\dist\src'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "console": require.resolve("console-browserify") }'
    - install 'console-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "console": false }
ERROR in ./node_modules/diagnostic-channel/dist/src/channel.js 138:23-40
Module not found: Error: Can't resolve 'module' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\diagnostic-channel\dist\src'
ERROR in ./node_modules/diagnostic-channel/dist/src/patchRequire.js 10:19-36
Module not found: Error: Can't resolve 'module' in 'C:\git\regionstockholm\src\RegionStockholm.Frontend\node_modules\diagnostic-channel\dist\src'

Update:

I've resolved it via mocking the applicationinsights. But this should be still fixed. It worked on Mac.