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

Does it work with webpack 5? #149

Open
tanekim88 opened this issue Oct 1, 2020 · 20 comments · Fixed by #152
Open

Does it work with webpack 5? #149

tanekim88 opened this issue Oct 1, 2020 · 20 comments · Fixed by #152

Comments

@tanekim88
Copy link

I can't seem to make it work on webpack 5

@jeiea
Copy link

jeiea commented Oct 16, 2020

It's the exception I encountered for future reference.

[webpack-cli] Promise rejection: TypeError: 'get' on proxy: property 'tapAsync' is a read-only and non-configurable data property on the proxy target but the proxy did not return its actual value (expected '(options, fn) => {
                                                processAssetsHook.tapAsync(
                                                        getOptions(options),
                                                        (assets, callback) =>
        ...<omitted>... }' but got 'function () { [native code] }')
[webpack-cli] TypeError: 'get' on proxy: property 'tapAsync' is a read-only and non-configurable data property on the proxy target but the proxy did not return its actual value (expected '(options, fn) => {
                                                processAssetsHook.tapAsync(
                                                        getOptions(options),
                                                        (assets, callback) =>
        ...<omitted>... }' but got 'function () { [native code] }')
    at Proxy.<anonymous> (/project/node_modules/copy-webpack-plugin/dist/index.js:340:42)
    at /speed-measure-webpack-plugin/WrappedPlugin/index.js:52:19
    at Hook.eval [as call] (eval at create (/project/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1)
    at Hook.CALL_DELEGATE [as _call] (/project/node_modules/webpack/node_modules/tapable/lib/Hook.js:14:14)
    at Compiler.newCompilation (/project/node_modules/webpack/lib/Compiler.js:918:30)
    at /project/node_modules/webpack/lib/Compiler.js:960:29
    at Hook.eval [as callAsync] (eval at create (/project/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/project/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
    at Compiler.compile (/project/node_modules/webpack/lib/Compiler.js:955:28)
    at /project/node_modules/webpack/lib/Watching.js:113:19
    at _next0 (eval at create (/project/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
    at eval (eval at create (/project/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:26:1)

@Deji69
Copy link

Deji69 commented Oct 22, 2020

Got the same issue.

4 similar comments
@codeGun123
Copy link

Got the same issue.

@guoxiaomenghh
Copy link

Got the same issue.

@luohuidong
Copy link

Got the same issue.

@tianzhu1992
Copy link

Got the same issue.

@SunShinewyf
Copy link

Got the same issue.

1 similar comment
@yzStrive
Copy link

Got the same issue.

@MyEasy
Copy link

MyEasy commented Dec 28, 2020

It still doesn't work on webpack 5.11.0

@donniean
Copy link

Got the same issue.

@thw0rted
Copy link

If you have the same issue, everybody, please just put a "thumbs-up" reaction on the original post, instead of replying "me too". This is important because everyone watching the issue for news will be notified every time you leave a comment.

@lephuongbg
Copy link

Tried the version in the PR to this issue but another error happened. This time is with html-webpack-plugin 5.0.0-beta.5.

[webpack-cli] TypeError: Cannot read property 'PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE' of undefined
    at Proxy.<anonymous> (/var/app/web/node_modules/html-webpack-plugin/index.js:222:31)
    at /var/app/web/node_modules/speed-measure-webpack-plugin/WrappedPlugin/index.js:52:19
    at Hook.eval [as call] (eval at create (/var/app/web/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:52:1)
    at Hook.CALL_DELEGATE [as _call] (/var/app/web/node_modules/webpack/node_modules/tapable/lib/Hook.js:14:14)
    at Compiler.newCompilation (/var/app/web/node_modules/webpack/lib/Compiler.js:990:30)
    at /var/app/web/node_modules/webpack/lib/Compiler.js:1033:29
    at Hook.eval [as callAsync] (eval at create (/var/app/web/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:22:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/var/app/web/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
    at Compiler.compile (/var/app/web/node_modules/webpack/lib/Compiler.js:1028:28)
    at /var/app/web/node_modules/webpack/lib/Compiler.js:471:12
    at Compiler.readRecords (/var/app/web/node_modules/webpack/lib/Compiler.js:869:11)
    at /var/app/web/node_modules/webpack/lib/Compiler.js:468:11
    at Hook.eval [as callAsync] (eval at create (/var/app/web/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:34:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/var/app/web/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
    at /var/app/web/node_modules/webpack/lib/Compiler.js:465:20
    at Hook.eval [as callAsync] (eval at create (/var/app/web/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:22:1)
ERROR: 2

@takhello
Copy link

[webpack-cli] TypeError: Cannot read property 'PROCESS_ASSETS_STAGE_ADDITIONS' of undefined

@RettentoRectangle
Copy link

Same here with Webpack 5.20+ and SMP 1.4.2

(node:11916) [DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader

(node:11916) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE' of undefined
at Proxy. (...node_modules\html-webpack-plugin\index.js:222:31)
at ...node_modules\speed-measure-webpack-plugin\WrappedPlugin\index.js:52:19
at Hook.eval (eval at create (...node_modules\tapable\lib\HookCodeFactory.js:19:10), :48:1)
at Compiler.newCompilation (...node_modules\webpack\lib\Compiler.js:992:30)
at ...node_modules\webpack\lib\Compiler.js:1035:29
at Hook.eval [as callAsync] (eval at create (...node_modules\tapable\lib\HookCodeFactory.js:33:10), :22:1)
at Compiler.compile (...node_modules\webpack\lib\Compiler.js:1030:28)
at ...node_modules\webpack\lib\Watching.js:112:19
at _next2 (eval at create (...node_modules\tapable\lib\HookCodeFactory.js:33:10), :23:1)
at eval (eval at create (...node_modules\tapable\lib\HookCodeFactory.js:33:10), :35:1)

@songjinzhou
Copy link

版本问题????

@SamuelTrew
Copy link

Putting this here as I believe it to be webpack 5 related and I tried the mini-css fix of putting it to 1.35.

I get this error below:

Error: ObjectMiddleware.register: serializer for mini-css-extract-plugin/dist/CssModule/null is already registered
... at Object.register
... at Function.getCssModule
... at MiniCssExtractPlugin.apply

@perteraul
Copy link

@SamuelTrew - I get the exact same error. Did you find a solution?

@SamuelTrew
Copy link

@SamuelTrew - I get the exact same error. Did you find a solution?

I ended up removing the @types/webpack dependency as it is apparently deprecated with webpack 5. That fixed it as I believe it was referring to old types

@dhpagani
Copy link

dhpagani commented May 6, 2021

@SamuelTrew I've got the same error as you, but I do not have @types/webpack dependency. Do you know if some nested dependency can cause it?


Checking my config file, i've been using the mini-css three times (to generate different filenames, to maintain retrocompatibility) and works fine without speed-measure. Maybe something related to that.

@ShuiRuTian
Copy link

Hi guys, I am writing a successor of this plugin: https://github.com/ShuiRuTian/time-analytics-webpack-plugin.

You could have a try with it. I believe it's providing a better experience for webpack 5.

It's in an early period(the API is not frozen and maybe buggy), but it's working for me.

Any feedback is welcomed!

@kevinolivar
Copy link

kevinolivar commented Jan 27, 2023

Working but getting this,

[DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader

"webpack": "^5.65.0", (apparently also on 5.75.0 still happening)
"speed-measure-webpack-plugin": "^1.5.0",

webpack has deprecated that hook but speed measure plugin still referencing it.

Original
#123

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

Successfully merging a pull request may close this issue.