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

Improve error messages #106

Open
VitGottwald opened this issue Aug 8, 2018 · 0 comments
Open

Improve error messages #106

VitGottwald opened this issue Aug 8, 2018 · 0 comments

Comments

@VitGottwald
Copy link
Contributor

VitGottwald commented Aug 8, 2018

I just wrote an AMD webpack-style loader to resolve AMD modules in a fastpack build. When I report an error in the loader, it shows the parent module as the source of error:

Building FE renderer with fastpack

Project Directory: /xxx
Mode: development
Call Stack:
        './mouse' from module: node_modules/fpack-amd-loader/index.js!node_modules/jquery-ui/ui/widgets/draggable.js
'jquery-ui/ui/widgets/draggable' from module: src/main/fe/thirdparty/renderer.js
'thirdparty/renderer.js' from module: builtin!src/main/fe/renderer/index.js
'./src/main/fe/renderer/index.js' from module: $fp$main
Processing Module: node_modules/fpack-amd-loader/index.js!node_modules/jquery-ui/ui/widgets/draggable.js

Unsupports define(dependencyList, factory) call, it was called with 3 arguments:
StringLiteral, ArrayExpression, Identifier

The module causing error is node_modules/fpack-amd-loader/index.js!node_modules/jquery-ui/ui/widgets/mouse.js. Maybe it is clear when one studies the call stack in detail. But I think it would be nice to show the module in error at the top of the call stack to make it stand out and easy to copy/paste for editor or terminal click to open it.

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

No branches or pull requests

1 participant