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

Wrong path in stack traces with source maps #21

Open
gear54rus opened this issue Jan 12, 2016 · 1 comment
Open

Wrong path in stack traces with source maps #21

gear54rus opened this issue Jan 12, 2016 · 1 comment

Comments

@gear54rus
Copy link
Contributor

For some reason, the path is mangled. Stack trace for endpoint.js:

2016-01-11 23:11:04.152 [ERROR][E:5de] Failed to initialize: Error: test
    at ../../_src/runtime/endpoint.js:97:13
    at tryCatcher (/usr/share/aps/node/node_modules/bluebird/js/release/util.js:11:23)
    at Promise._settlePromiseFromHandler (/usr/share/aps/node/node_modules/bluebird/js/release/promise.js:489:31)
    at Promise._settlePromise (/usr/share/aps/node/node_modules/bluebird/js/release/promise.js:546:18)
    at Promise._settlePromise0 (/usr/share/aps/node/node_modules/bluebird/js/release/promise.js:591:10)
    at Promise._settlePromises (/usr/share/aps/node/node_modules/bluebird/js/release/promise.js:674:18)
    at Promise._fulfill (/usr/share/aps/node/node_modules/bluebird/js/release/promise.js:615:18)
    at /usr/share/aps/node/node_modules/bluebird/js/release/nodeback.js:42:21
    at tryToString (fs.js:414:3)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:401:12)

../../_src/runtime/endpoint.js:97:13 is obviously wrong, since no _src directory exists on the installation host. Notice that other paths are OK. Source map in question:

{"version":3,"sources":["../../_src/runtime/endpoint.js"],"names":[],"mappings":"...

Need to research the sourceFileName from these docs.

@gear54rus
Copy link
Contributor Author

IDK how it works, seriously... Not sure source-map-support even supports relative paths. It seems to just dump whatever's in sources[0] in that trace, even if it's a relative path. Found this.

Also, babel compilation step when building may have to be done separately for each file because no relative directories change the generated path in sources[0]... Send help. 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant