What's wrong with workbox-webpack-plugin using InjectManifest mode?

configuration of webpack

 new workboxPlugin.InjectManifest({
    swSrc: "sw.js",
    swDest: "serviceWorker.js"
 })

error report:

clipboard.png

readFile is empty?

Jan.10,2022

workbox-webpack-plugin@3.6.3 requires a peer of webpack@ ^ 2.0.0 | | ^ 3.0.0 | | ^ 4.0.0

it must be that your webpack version is too low.

Menu