Detailled error message when compilation fails?
See original GitHub issueDescription
Even when using brunch watch -d
or DEBUG='brunch:*' brunch watch
, the compilation issues do not include debug information. Notifications are empty too.
The problem is not specific, a misplaced comma, a missing paren, all kind of typo are concerned.
I have read the docs, search through post and issues, upgraded packages … At this point, I may be missing something obvious. Having used webpack before, it feels a little backwards.
Thanks!
Expected behavior
I’d like some basic details, pretty like like a console error would give, for instance :
% brunch watch -d
07 Nov 10:58:48 - error: Compiling of app/somefile.js failed.
Uncaught ReferenceError: foo is not defined - somefile.js:19:12
07 Nov 10:58:49 - info: compiled 239 files into 3 files, copied 36 in 4.2 sec
Webpack actually provides the babel output if need, to point out the failure location with an ^
arrow.
Actual behavior
When brunch watch -d
encounters a compilation failure, the error message is lacking some details, such as line/col number. :
% brunch watch -d
07 Nov 10:58:48 - error: Compiling of app/somefile.js failed.
07 Nov 10:58:49 - info: compiled 239 files into 3 files, copied 36 in 4.2 sec
Environment
- Brunch: 2.9.1
- Node: 7.0.0
- NPM: 3.5.9
- Operating system: linux
package.json
contents
"devDependencies": {
"auto-reload-brunch": "^2.7.1",
"autoprefixer": "^6.5.1",
"babel-brunch": "^6.0.6",
"babel-cli": "^6.16.0",
"babel-core": "^6.17.0",
"babel-preset-es2015": "^6.16.0",
"babel-preset-react": "^6.16.0",
"brunch": "^2.9.1",
"javascript-brunch": "^2.0.0",
"npm": "^3.10.9",
"stylus-brunch": "^2.7.2"
},
brunch config contents
exports.config = {
conventions: {
vendor: /(^bower_components|node_modules|^vendor\/app)[\\/]/
},
paths: {
watched: ['app', 'vendor/app', "lib", "templates"]
},
files: {
javascripts: {
joinTo: {
'js/libraries.js': /^(?!app\/)/,
'js/app.js': /^app\//
}
},
stylesheets: {
joinTo: 'css/app.css'
}
},
plugins: {
autoReload: {
delay: 2000
},
babel: {
presets: ['es2015', "react"],
},
},
npm: {
enabled: true,
globals: {
$: 'jquery',
jQuery: 'jquery'
}
},
};
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Compilation error - Wikipedia
Compilation error refers to a state when a compiler fails to compile a piece of computer program source code, either due to errors...
Read more >PL/SQL compilation fails with no error message - Stack Overflow
The package I was trying to compile had been wrapped. Apparently, you when compiling wrapped packages, you must be logged in as the...
Read more >Dealing with Error Messages
Compile the code with the command g++ -g -o sieve sieve.cpp. You should see a lot of error messages flying by, too quikcly...
Read more >Compile Error Messages - IBM
Msg ID Message Text Explanation
1001 no statement to compile The rule is does not contain any statements.
1002 unexpected end of program The rule...
Read more >How to see errors after compilation. - Oracle Communities
Hi, After you run your script, you execute show errors. Reagrds Salim. select * from user_errors; --Shows all errors, you can filter this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@paulmillr sorry to ping back on this closed issue but the problem is still there on my setup, once updated :
I am running brunch with the
LOGGY_STACKS=true
env var set.Am I missing something obvious? How can I help?
Nope, nothing. This might be babel-brunch not passing the error message to brunch.
Running babel on the particular file shows the babel style error :