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

Strange object is beeing dispatched internally #61

Open
DoumanAsh opened this issue Dec 16, 2017 · 0 comments
Open

Strange object is beeing dispatched internally #61

DoumanAsh opened this issue Dec 16, 2017 · 0 comments

Comments

@DoumanAsh
Copy link

DoumanAsh commented Dec 16, 2017

One of my dependencies, eslint-loader uses object-hash to retrieve hash for object { formatter: [Function], eslintPath: 'eslint' } at https://github.com/MoOx/eslint-loader/blob/master/index.js#L172

The strange thing that for some reason internally it gets supplied with strange object for which toString returns Object string which causes error:

ERROR in ./src/main.js
Module build failed: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be one of type string, TypedArray, or DataView
    at Hash.update (internal/crypto/hash.js:53:11)
    at write (D:\repos\js-code\cpp-tour\node_modules\object-hash\index.js:168:22)
    at Object._string (D:\repos\js-code\cpp-tour\node_modules\object-hash\index.js:299:7)
    at Object._object (D:\repos\js-code\cpp-tour\node_modules\object-hash\index.js:215:30)
    at Object.dispatch (D:\repos\js-code\cpp-tour\node_modules\object-hash\index.js:186:30)
    at D:\repos\js-code\cpp-tour\node_modules\object-hash\index.js:244:18
    at Array.forEach (<anonymous>)
    at Object._object (D:\repos\js-code\cpp-tour\node_modules\object-hash\index.js:240:21)
    at Object.dispatch (D:\repos\js-code\cpp-tour\node_modules\object-hash\index.js:186:30)
    at D:\repos\js-code\cpp-tour\node_modules\object-hash\index.js:258:23
    at Array.forEach (<anonymous>)
    at Object._array (D:\repos\js-code\cpp-tour\node_modules\object-hash\index.js:257:20)
    at Object._object (D:\repos\js-code\cpp-tour\node_modules\object-hash\index.js:215:30)
    at Object.dispatch (D:\repos\js-code\cpp-tour\node_modules\object-hash\index.js:186:30)
    at D:\repos\js-code\cpp-tour\node_modules\object-hash\index.js:244:18
    at Array.forEach (<anonymous>)
 @ multi (webpack)-dev-server/client?http://localhost:3333 ./src/main.js

I don't entirely understand how object-hash works but it seems to be happening due to this line https://github.com/puleos/object-hash/blob/master/index.js#L173-L175
I'm wondering is maybe some replacer used internally? As eslint-loader itself doesn't use any options at all

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

1 participant