Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add source-maps for better stack traces #403

Merged
merged 3 commits into from
Mar 19, 2019
Merged

Conversation

kernelwhisperer
Copy link
Contributor

Before:

 > TypeError: Cannot read property 'links' of undefined
    at _callee2$ (E:\repos\aragon\aragon-cli\packages\aragon-cli\dist\commands\ipfs_propagate.js:80:62)

After:

 > TypeError: Cannot read property 'links' of undefined
    at links (E:\repos\aragon\aragon-cli\packages\aragon-cli\src\commands\ipfs_propagate.js:37:56)

@kernelwhisperer kernelwhisperer added this to the aragonCLI v5.6 milestone Mar 17, 2019
@@ -71,6 +73,7 @@
"opn": "^5.3.0",
"rimraf": "^2.6.2",
"semver": "^5.4.1",
"source-map-support": "^0.5.11",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried using @babel/register instead, but it uses relative paths which my editor cannot open...:

 > TypeError: Cannot read property 'links' of undefined
    at console (../../src/commands/ipfs_propagate.js:37:11)

Note: @babel/register uses source-map-support under the hood.

@@ -8,11 +8,13 @@
"dao": "./aliases/dao"
},
"scripts": {
"build": "npm run extract-roles && babel -d dist src --copy-files",
"build": "npm run extract-roles && npm run compile:src",
"watch": "npm run build -- -- --watch",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"watch": "npm run build -- -- --watch",
"start": "npm run build -- -- --watch",

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think start feels kind of weird, since you're not technically starting anything (you'd still need to link it?). What about build:watch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Would be awesome if we could come up with a "community standard" like:
npm start - for production use (build, link, etc.)
npm run dev - for dev use

So you only one command (besides install) to get up and running, without looking in package.json.

Would've been cool if the npm team "reserved" a script for this. :D

@kernelwhisperer kernelwhisperer merged commit 19c21a9 into master Mar 19, 2019
@kernelwhisperer kernelwhisperer deleted the feat/add-source-maps branch March 19, 2019 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants