hard-source-webpack-plugin icon indicating copy to clipboard operation
hard-source-webpack-plugin copied to clipboard

Conflict with favicon plugin

Open yaitskov opened this issue 6 years ago • 1 comments

Hi,

Yesterday I added to my project favicon plugin. The project is using hard source plugin for long time.

"favicons-webpack-plugin": "0.0.9", 
"hard-source-webpack-plugin": "^0.6.4",
nodejs v6.11.4
[email protected]",

It worked somehow at the beginning, but building for scratch appeared that these plugins cannot work together.

There are 2 stack traces

ebpack: wait until bundle finished: 
webpack: wait until bundle finished: 
^[[B^[[A^[[B07 05 2018 09:19:03.927:ERROR [karma]: TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
    at fromObject (buffer.js:262:9)
    at Function.Buffer.from (buffer.js:101:10)
    at new Buffer (buffer.js:80:17)
    at writeOut (/home/dan/pro/ping-pong/code/ui/node_modules/webpack/lib/Compiler.js:334:17)
    at Immediate.<anonymous> (/home/dan/pro/ping-pong/code/ui/node_modules/memory-fs/lib/MemoryFileSystem.js:288:4)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)
07 05 2018 09:19:03.935:ERROR [karma]: TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
    at fromObject (buffer.js:262:9)
    at Function.Buffer.from (buffer.js:101:10)
    at new Buffer (buffer.js:80:17)
    at writeOut (/home/dan/pro/ping-pong/code/ui/node_modules/webpack/lib/Compiler.js:334:17)
    at Immediate.<anonymous> (/home/dan/pro/ping-pong/code/ui/node_modules/memory-fs/lib/MemoryFileSystem.js:288:4)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate (timers.js:617:5)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)
09:19$ grunt webpack && karma start
Running "webpack" task
 10% building modules 1/1 modules 0 active 10% building modules 1/2 modules 1 activ 10% building modules 1/2 modules 1 active ...code/ui/n 68% building modules 1016/1038 modules 22 active ...re/directive/clickable/cHash: cddfbc124d495ad4cd5e                                  s
Version: webpack 3.10.0 / grunt-webpack 3.0.2
Time: 28830ms
                      
ebpack: wait until bundle finished: 
webpack: wait until bundle finished: 
TypeError: Data must be a string or a buffer
    at TypeError (native)
    at Hash.update (crypto.js:74:16)
    at Object.getHashDigest (/home/dan/pro/ping-pong/code/ui/node_modules/offline-plugin/node_modules/loader-utils/index.js:248:7)
    at /home/dan/pro/ping-pong/code/ui/node_modules/offline-plugin/lib/index.js:441:45
    at Array.forEach (native)
    at OfflinePlugin.setHashesMap (/home/dan/pro/ping-pong/code/ui/node_modules/offline-plugin/lib/index.js:436:39)
    at Compiler.<anonymous> (/home/dan/pro/ping-pong/code/ui/node_modules/offline-plugin/lib/index.js:268:18)
    at next (/home/dan/pro/ping-pong/code/ui/node_modules/tapable/lib/Tapable.js:204:14)
    at /home/dan/pro/ping-pong/code/ui/node_modules/html-webpack-plugin/index.js:204:9
    at PassThroughHandlerContext.finallyHandler (/home/dan/pro/ping-pong/code/ui/node_modules/bluebird/js/release/finally.js:56:23)
    at PassThroughHandlerContext.tryCatcher (/home/dan/pro/ping-pong/code/ui/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/dan/pro/ping-pong/code/ui/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/home/dan/pro/ping-pong/code/ui/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/home/dan/pro/ping-pong/code/ui/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/dan/pro/ping-pong/code/ui/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/home/dan/pro/ping-pong/code/ui/node_modules/bluebird/js/release/async.js:133:16)
09:16$ grunt webpack && karma start
Running "webpack" task
[hard-source:core] HardSourceWebpackPlugin is writing to a new confighash path for the first time: /home/dan/pro/ping-pong/code/ui/node_modules/.cache/hard-source/55f7c60a48767ec19785b023591785f5c1f5406c8256eb544c253901096de6ad
[hard-source:core] HardSourceWebpackPlugin is writing to a new confighash path for the first time: /home/dan/pro/ping-pong/code/ui/node_modules/.cache/hard-source/4a15fb95f313dffb0fbb7ab2e4d9964f0e4e67506bebde5a2880661e2462f47d
 10% building modules 1/1 modules 0 active 10% building modules 1/2 modules 1 activ 10% building modules 1/2 modules 1 active ...code/ui/nHash: 072dceb86f42833159a9                                                                                                               s
Version: webpack 3.10.0 / grunt-webpack 3.0.2
Time: 49315ms

yaitskov avatar May 07 '18 07:05 yaitskov

@yaitskov I need more information. I tried making a project with the stated versions for node, webpack, etc and have not been to reproduce this issue. Can you make a repository with a minimal reproduction?

mzgoddard avatar May 23 '18 03:05 mzgoddard