exports.useColors is not a function
See original GitHub issueEverything was working fine Friday. Had to reinstall fresh all my npm packages this morning, and I got this error in my webpack-dev-server
As I didn’t change anything to my package.json (and I’m not using directly debug
) I suspect an update in the last days broke things.
The only package I have using the most recent debug
version is babel-core@6.17.0
(-> debug@2.4.5
)
My webpack@1.13.2
and webpack-dev-server@1.16.2
use debug@2.2.0
I have no idea how to solve this issue right now, so if someone has clues I’d be happy to help
Extract of debug.js causing the problem :
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:16 (4 by maintainers)
Top Results From Across the Web
webpack error : TypeError: mocha.useColors is not a function ...
Although it works when using mocha.color(true) , typescript will complain: error TS2339: Property 'color' does not exist on type 'Mocha'. .
Read more >exports.useColors is not a function · Issue #384 · debug-js ...
Everything was working fine Friday. Had to reinstall fresh all my npm packages this morning, and I got this error in my webpack-dev-server....
Read more >api documentation for mocha-webpack (v0.7.0)
color = function (type, str) { if (!exports.useColors) { return String(str); } return '\u001b[' + exports.colors[type] + 'm' + str + '\u001b[0m'; }...
Read more >Documentation - mocha.js
esmDecorator] - Function invoked on esm module name right before importing it. By default will passthrough as is. * @returns {Promise}; * @example ......
Read more >TypeError: require(...) is not a function in Node.js | bobbyhadz
Having cyclic dependencies (imports and exports between the same modules). typeerror require is not a function. Here is an example of how the...
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
@DaveGee For posterity, I’m curious as to what your
webpack.config.js
file looks like.This is insane. Adding the lines about bower.json in the config of webpack solves the issue apparently, although I repeat : I do not use
bower
, and have nobower.json
, nor.bower.json
file anywhere in my own codeSo I must add a config line about a tool I don’t use for my code to work. Anyone has an explanation about this ?
Thanks for your help
I’ll look more into this, as I won’t let my config files get messy with unrelated stuff. I think I prefer the
shrinkwrap
way