Weird errors when using 'brunch watch'
See original GitHub issueRunning brunch build
works fine, but when running brunch watch
it executes the initial compilation well but when I edit a file and save it brunch throws errors.
When I edit a CSS file I get this error:
R:\project\node_modules\uglify-js-brunch\lib\index.js:50
data: optimized.code
^
TypeError: Cannot read property 'code' of undefined
at UglifyMinifier.module.exports.UglifyMinifier.optimize (R:\project\node_modules\uglify-js-brunch\lib\index.js:50:24)
at R:\project\node_modules\uglify-js-brunch\lib\index.js:3:59
at generate (C:\Users\myusername\AppData\Roaming\npm\node_modules\brunch\lib\fs_utils\generate.js:253:12)
at gen (C:\Users\myusername\AppData\Roaming\npm\node_modules\brunch\lib\fs_utils\write.js:93:14)
at C:\Users\myusername\AppData\Roaming\npm\node_modules\brunch\node_modules\async-each\index.js:16:7
at Array.forEach (native)
at each (C:\Users\myusername\AppData\Roaming\npm\node_modules\brunch\node_modules\async-each\index.js:15:11)
at Object.module.exports.write (C:\Users\myusername\AppData\Roaming\npm\node_modules\brunch\lib\fs_utils\write.js:95:12)
at C:\Users\myusername\AppData\Roaming\npm\node_modules\brunch\lib\watch.js:266:23
at FileList.<anonymous> (C:\Users\myusername\AppData\Roaming\npm\node_modules\brunch\lib\watch.js:523:18)
at FileList.EventEmitter.emit (events.js:92:17)
at null._onTimeout (C:\Users\myusername\AppData\Roaming\npm\node_modules\brunch\lib\fs_utils\file_list.js:115:17)
at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
When I edit a JS file I get this error:
R:\project\node_modules\uglify-js-brunch\lib\index.js:52
callback(error, result || data);
^
TypeError: string is not a function
at UglifyMinifier.module.exports.UglifyMinifier.optimize (R:\project\node_modules\uglify-js-brunch\lib\index.js:52:7)
at R:\project\node_modules\uglify-js-brunch\lib\index.js:3:59
at generate (C:\Users\myusername\AppData\Roaming\npm\node_modules\brunch\lib\fs_utils\generate.js:253:12)
at gen (C:\Users\myusername\AppData\Roaming\npm\node_modules\brunch\lib\fs_utils\write.js:93:14)
at C:\Users\myusername\AppData\Roaming\npm\node_modules\brunch\node_modules\async-each\index.js:16:7
at Array.forEach (native)
at each (C:\Users\myusername\AppData\Roaming\npm\node_modules\brunch\node_modules\async-each\index.js:15:11)
at Object.module.exports.write (C:\Users\myusername\AppData\Roaming\npm\node_modules\brunch\lib\fs_utils\write.js:95:12)
at C:\Users\myusername\AppData\Roaming\npm\node_modules\brunch\lib\watch.js:266:23
at FileList.<anonymous> (C:\Users\myusername\AppData\Roaming\npm\node_modules\brunch\lib\watch.js:523:18)
at FileList.EventEmitter.emit (events.js:92:17)
at null._onTimeout (C:\Users\myusername\AppData\Roaming\npm\node_modules\brunch\lib\fs_utils\file_list.js:115:17)
at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
After errors I have to rerun brunch watch
because it gets killed by the error, although it doesn’t make sense because on the next run it crashes again, always.
Any ideas? Thanks!
Issue Analytics
- State:
- Created 10 years ago
- Comments:30 (11 by maintainers)
Top Results From Across the Web
Brunch watch error - ENAMETOOLONG - Stack Overflow
After reinstalling my system I have tried to setup my frontend project and came up with the annoying error with brunch watch which...
Read more >Watch the Weird and Sad 'Brooklyn Hipster Brunch' Video
"Girlies so fly with their mom jeans tush/Boys' faces hairy like a '70s bush," she raps with crazy eyes. Nadia also shakes a...
Read more >Sunday Brunch viewers unimpressed with weekend show ...
Sunday Brunch viewers unimpressed with weekend show 'Such a weird awkward vibe'. SUNDAY BRUNCH fans tuned in to watch the Channel 4 show...
Read more >Watch Tom Hiddleston's Bizarre Chinese Centrum Advert ...
"I finished early so thought I'd pop back and make you breakfast," he says, handing you a plate of what seems to be...
Read more >36 easy brunch ideas | Features | Jamie Oliver
We've got tonnes of brunch and breakfast recipes right here! ... Whether it's soft, pillowy scrambled eggs with smoked salmon, a pile of ......
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
I just released a new version of the plugin in case this is somehow related to https://github.com/brunch/uglify-js-brunch/commit/421f79ca2c5fffdf1a1460e530154de674e4fc71.
Run
npm update
fromR:\project\
and try again.Alright, thanks!