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

Error messages are not detailed enough #27

Closed
shancarter opened this issue Jul 10, 2017 · 2 comments
Closed

Error messages are not detailed enough #27

shancarter opened this issue Jul 10, 2017 · 2 comments

Comments

@shancarter
Copy link
Contributor

When building with webpack (either in dev mode or as a build step), these are the sorts of error messages I see, missing line or column information or more detailed context:

ERROR in ./components/Contour.html
Module build failed: Error: ParseError: Unexpected token
    at Object.module.exports (../node_modules/svelte-loader/index.js:36:19)
 @ ./components/contour.js 3:15-40

I made an attempt at a [PR}(https://github.com//pull/26) to get more context, and it works locally but I seem to have screwed something up.

@shancarter
Copy link
Contributor Author

shancarter commented Jul 11, 2017

For instance, if you introduce a syntax error into the webpack2 example provided, this is the complete error message that is output by webpack:

(node:32434) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
Unexpected token
Hash: 1b01db851aa2f4e289c8
Version: webpack 2.6.1
Time: 631ms
   Asset     Size  Chunks             Chunk Names
index.js  15.8 kB       0  [emitted]  index
   [0] ./src/index.js 248 bytes {0} [built]
   [1] ./src/counter.html 6.71 kB {0} [built]
   [2] ./src/header.html 229 bytes {0} [built] [failed] [2 errors]
   [3] multi ./src/index.js 28 bytes {0} [built]

ERROR in ./src/header.html
(Emitted value instead of an instance of Error) Unexpected token
 @ ./src/counter.html 3:0-30
 @ ./src/index.js
 @ multi ./src/index.js

ERROR in ./src/header.html
Module build failed: TypeError: Cannot match against 'undefined' or 'null'.
    at Object.module.exports (/Users/shancarter/development/svelte-loader/example/webpack2/node_modules/svelte-loader/index.js:9:25)
 @ ./src/counter.html 3:0-30
 @ ./src/index.js
 @ multi ./src/index.js

@nikku
Copy link
Contributor

nikku commented Sep 3, 2017

PR #26 merged so I guess this can be closed?

@nikku nikku closed this as completed Sep 3, 2017
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

2 participants