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

entries[0].files.values is not a function #108

Open
selmalee opened this issue Aug 5, 2021 · 0 comments
Open

entries[0].files.values is not a function #108

selmalee opened this issue Aug 5, 2021 · 0 comments

Comments

@selmalee
Copy link

selmalee commented Aug 5, 2021

this error occurs:

[1] (node:27264) UnhandledPromiseRejectionWarning: TypeError: entries[0].files.values is not a function
[1] at xxx/node_modules/worker-plugin/dist/loader.js:86:59
[1] at compile (xxx/node_modules/webpack/lib/Compiler.js:343:11)
[1] at hooks.afterCompile.callAsync.err (xxx/node_modules/webpack/lib/Compiler.js:681:15)
[1] at AsyncSeriesHook.eval [as callAsync] (eval at create (xxx/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
[1] at AsyncSeriesHook.lazyCompileHook (xxx/node_modules/tapable/lib/Hook.js:154:20)
[1] at compilation.seal.err (xxx/node_modules/webpack/lib/Compiler.js:678:31)
[1] at AsyncSeriesHook.eval [as callAsync] (eval at create (xxx/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
[1] at AsyncSeriesHook.lazyCompileHook (xxx/node_modules/tapable/lib/Hook.js:154:20)
[1] at hooks.optimizeAssets.callAsync.err (xxx/node_modules/webpack/lib/Compilation.js:1423:35)
[1] at AsyncSeriesHook.eval [as callAsync] (eval at create (xxx/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
[1] at AsyncSeriesHook.lazyCompileHook (xxx/node_modules/tapable/lib/Hook.js:154:20)
[1] at hooks.optimizeChunkAssets.callAsync.err (xxx/node_modules/webpack/lib/Compilation.js:1414:32)
[1] at _promise0.then._result0 (eval at create (xxx/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:13:1)
[1] at <anonymous>

.values is unsupported in Node versions below 8. So, I suggest .values should be replaced by

var vals = Object.keys(countries).map(function(key) {
    return countries[key];
});
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