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

TypeError: Cannot read properties of undefined (reading 'tap')

Open suiboyu opened this issue 3 years ago • 15 comments

When I use this plug-in in a business project, it works fine. But when I use it in the component library, I get an error.

tapable.hooks[name].tap(reason, callback);
                        ^

TypeError: Cannot read properties of undefined (reading 'tap')

Operating System, Node, and NPM dependency versions

Mac OS 11.2.3
Node 16.12.0

"devDependencies": {
  "webpack": "^5.11.0",
    "webpack-bundle-analyzer": "^4.4.2",
    "webpack-cli": "^4.2.0",
    "webpack-dev-server": "^3.11.2",
    "webpack-manifest-plugin": "^4.0.2"
}

suiboyu avatar Dec 13 '21 07:12 suiboyu

+1

afeiship avatar Dec 29 '21 06:12 afeiship

+2

tmcconechy avatar Feb 07 '22 16:02 tmcconechy

+3

DhirajBhakta avatar Feb 07 '22 17:02 DhirajBhakta

Ok. reverted to webpack4 and it works just fine

DhirajBhakta avatar Feb 15 '22 09:02 DhirajBhakta

+4

niyuanfa avatar Apr 01 '22 09:04 niyuanfa

+1

jetBn avatar Apr 15 '22 06:04 jetBn

+1

NasadykVlad avatar Apr 15 '22 09:04 NasadykVlad

++1

geekftz avatar May 10 '22 18:05 geekftz

+1

wpc669418 avatar May 17 '22 01:05 wpc669418

+1

korsmic avatar May 18 '22 00:05 korsmic

This is because Webpack 5.x is not supported (https://github.com/mzgoddard/hard-source-webpack-plugin/issues/546).

bfontaine avatar May 29 '22 11:05 bfontaine

the same problems

w-t-w avatar Sep 21 '22 04:09 w-t-w

@w-t-w Please refrain from posting these sort of "me too" or "+1" comments; you’re notifying 11 persons for nothing.

bfontaine avatar Sep 21 '22 14:09 bfontaine