Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/colthreepv/sentry-ts-repro
compile a node+typescript project, then minify it, and have Sentry errors be trackable via SourceMap(s)
https://github.com/colthreepv/sentry-ts-repro
Last synced: 25 days ago
JSON representation
compile a node+typescript project, then minify it, and have Sentry errors be trackable via SourceMap(s)
- Host: GitHub
- URL: https://github.com/colthreepv/sentry-ts-repro
- Owner: colthreepv
- Created: 2019-06-25T14:51:11.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T01:04:18.000Z (almost 2 years ago)
- Last Synced: 2024-04-15T03:19:58.211Z (7 months ago)
- Language: TypeScript
- Size: 239 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
sentry-ts-repro
===============The purpose is to compile a node+typescript project,
then minify it, and have Sentry errors be trackable via SourceMap(s)**SPOILER ALERT**: node 10.x produces wrong error col/lines on minified sourcecode (that [should be the issue](https://github.com/nodejs/node/issues/2860))
node 12.x on the other hand produces correct ones, as it uses more recent V8.# Prerequisities
- Be registered on sentry.io
- Have an organization/project with `node.js` ready
- Generate an auth token here: https://sentry.io/settings/account/api/auth-tokens/**Configure ENV Variables**:
```shell
export SENTRY_AUTH_TOKEN=
export SENTRY_ORG=
export SENTRY_PROJECT=
export SENTRY_DSN=
```### Build project
Clone this, then:
```shell
./build.sh build
node build/app.js
```### Build project minified
Clone this, then:
```shell
./build.sh minified
node minified/app.js
```## Finding the source line/column
Edit `source-map.js` and provide correct line/column values then `node source-map.js`**What to expect:**
```
{
source: '/src/lib.ts',
line: 4,
column: 30,
name: null
}
```### Additional useful commands
Delete release files in between tries:
```
./clean-release.sh
```