Skip to content

When using copyFiles: HookWebpackError: Problem deleting JS entry for _tmp_copy: 0 files were deleted #925

@jusurb

Description

@jusurb
HookWebpackError: Problem deleting JS entry for _tmp_copy: 0 files were deleted ()
    at makeWebpackError (sfux/node_modules/webpack/lib/HookWebpackError.js:49:9)
    at sfux/node_modules/webpack/lib/Compilation.js:2383:12
    at eval (eval at create (sfux/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:30:1)
    at fn (sfux/node_modules/webpack/lib/Compilation.js:373:17)
    at Hook.eval [as callAsync] (eval at create (sfux/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (sfux/node_modules/tapable/lib/Hook.js:18:14)
    at cont (sfux/node_modules/webpack/lib/Compilation.js:2380:34)
    at sfux/node_modules/webpack/lib/Compilation.js:2426:10
    at sfux/node_modules/neo-async/async.js:2830:7
    at Object.each (sfux/node_modules/neo-async/async.js:2850:39)
-- inner error --
Error: Problem deleting JS entry for _tmp_copy: 0 files were deleted ()
    at sfux/node_modules/@symfony/webpack-encore/lib/webpack/delete-unused-entries-js-plugin.js:49:27
    at Set.forEach (<anonymous>)
    at deleteEntries (sfux/node_modules/@symfony/webpack-encore/lib/webpack/delete-unused-entries-js-plugin.js:18:28)
    at sfux/node_modules/@symfony/webpack-encore/lib/webpack/delete-unused-entries-js-plugin.js:59:17
    at sfux/node_modules/webpack/lib/Compilation.js:474:56
    at fn (sfux/node_modules/webpack/lib/Compilation.js:371:10)
    at Hook.eval [as callAsync] (eval at create (sfux/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (sfux/node_modules/tapable/lib/Hook.js:18:14)
    at cont (sfux/node_modules/webpack/lib/Compilation.js:2380:34)
    at sfux/node_modules/webpack/lib/Compilation.js:2426:10
caused by plugins in Compilation.hooks.processAssets
Error: Problem deleting JS entry for _tmp_copy: 0 files were deleted ()
    at sfux/node_modules/@symfony/webpack-encore/lib/webpack/delete-unused-entries-js-plugin.js:49:27
    at Set.forEach (<anonymous>)
    at deleteEntries (sfux/node_modules/@symfony/webpack-encore/lib/webpack/delete-unused-entries-js-plugin.js:18:28)
    at sfux/node_modules/@symfony/webpack-encore/lib/webpack/delete-unused-entries-js-plugin.js:59:17
    at sfux/node_modules/webpack/lib/Compilation.js:474:56
    at fn (sfux/node_modules/webpack/lib/Compilation.js:371:10)
    at Hook.eval [as callAsync] (eval at create (sfux/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (sfux/node_modules/tapable/lib/Hook.js:18:14)
    at cont (sfux/node_modules/webpack/lib/Compilation.js:2380:34)
    at sfux/node_modules/webpack/lib/Compilation.js:2426:10

this only occurs when using copyFiles:

.copyFiles([
    {
      from: './node_modules/bootstrap/dist/fonts/',
      to: 'fonts/[name].[hash:8].[ext]',
    },
  ])

files are webfonts ending in extensions: eot, woff, ttf, woff2

@symfony/[email protected]
webpack 5.21.2
webpack-cli 4.5.0
webpack-dev-server 4.0.0-beta.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions