sp-build-tasks icon indicating copy to clipboard operation
sp-build-tasks copied to clipboard

Gulp build --prod --webpack error

Open Reksy opened this issue 2 years ago • 2 comments

Hello!

I faced with error when using this command:

Gulp build --prod --webpack

Error: Cannot find module 'copy-webpack-plugin'
Require stack: TypeError: Cannot read property 'get' of undefined at C:_git\IPMS\Src\Front\node_modules\webpack\lib\DefinePlugin.js:292:38 at SyncHook.eval [as call] (eval at create (C:_git\IPMS\Src\Front\node_modules\tapable\lib\HookCodeFactory.js:19:10), :11:1) at SyncHook.lazyCompileHook (C:_git\IPMS\Src\Front\node_modules\tapable\lib\Hook.js:154:20) at Compiler.newCompilation (C:_git\IPMS\Src\Front\node_modules\sp-build-tasks\node_modules\webpack\lib\Compiler.js:631:26) at C:_git\IPMS\Src\Front\node_modules\sp-build-tasks\node_modules\webpack\lib\Compiler.js:667:29 at AsyncSeriesHook.eval [as callAsync] (eval at create (C:_git\IPMS\Src\Front\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1) at AsyncSeriesHook.lazyCompileHook (C:_git\IPMS\Src\Front\node_modules\tapable\lib\Hook.js:154:20) at Compiler.compile (C:_git\IPMS\Src\Front\node_modules\sp-build-tasks\node_modules\webpack\lib\Compiler.js:662:28) at C:_git\IPMS\Src\Front\node_modules\sp-build-tasks\node_modules\webpack\lib\Compiler.js:321:11 at Compiler.readRecords (C:_git\IPMS\Src\Front\node_modules\sp-build-tasks\node_modules\webpack\lib\Compiler.js:529:11)

What it can be?

Thanks.

Reksy avatar Apr 28 '22 11:04 Reksy

PS. I have installed a module 'copy-webpack-plugin' but have the same error.

Reksy avatar Apr 28 '22 11:04 Reksy

The problem was in version of webpack. I used a 5th, but this package can't work with it=) So I install v4 of webpack=)

Reksy avatar Apr 28 '22 11:04 Reksy