konradmistrz Posted January 31, 2021 Share Posted January 31, 2021 Hello, I'm totally new to all of that stuff and if u reply pls use simplest explanation possible. I'm actually new to web tech. There is a problem with webpack when im trying to use 'npm run watch' and it says Quote [webpack-cli] TypeError: compiler.plugin is not a function at ExtractTextPlugin.apply (C:\xampp\htdocs\prestashop\themes\classic\_dev\node_modules\extract-text-webpack-plugin\index.js:233:11) at createCompiler (C:\xampp\htdocs\prestashop\themes\classic\_dev\node_modules\webpack\lib\webpack.js:69:12) at create (C:\xampp\htdocs\prestashop\themes\classic\_dev\node_modules\webpack\lib\webpack.js:113:15) at webpack (C:\xampp\htdocs\prestashop\themes\classic\_dev\node_modules\webpack\lib\webpack.js:121:46) at f (C:\xampp\htdocs\prestashop\themes\classic\_dev\node_modules\webpack\lib\index.js:37:15) at WebpackCLI.createCompiler (C:\xampp\htdocs\prestashop\themes\classic\_dev\node_modules\webpack-cli\lib\webpack-cli.js:1337:24) at async WebpackCLI.bundleCommand (C:\xampp\htdocs\prestashop\themes\classic\_dev\node_modules\webpack-cli\lib\webpack-cli.js:1433:20) at async Command.<anonymous> (C:\xampp\htdocs\prestashop\themes\classic\_dev\node_modules\webpack-cli\lib\webpack-cli.js:384:25) at async Promise.all (index 1) at async Command.<anonymous> (C:\xampp\htdocs\prestashop\themes\classic\_dev\node_modules\webpack-cli\lib\webpack-cli.js:824:13) npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! [email protected] watch: `webpack --progress --watch` npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the [email protected] watch script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. the complete log is Quote 0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli 'C:\\Program Files\\nodejs\\node.exe', 1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'watch' 1 verbose cli ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'prewatch', 'watch', 'postwatch' ] 5 info lifecycle [email protected]~prewatch: [email protected] 6 info lifecycle [email protected]~watch: [email protected] 7 verbose lifecycle [email protected]~watch: unsafe-perm in lifecycle true 8 verbose lifecycle [email protected]~watch: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\xampp\htdocs\prestashop\themes\classic\_dev\node_modules\.bin;C:\Users\ja\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\ja\bin;C:\Python39\Scripts;C:\Python39;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files\MySQL\MySQL Shell 8.0\bin;C:\Users\ja\AppData\Local\Programs\Python\Python38\Scripts;C:\Users\ja\AppData\Local\Programs\Python\Python38;C:\Users\ja\geckodriver.exe;C:\Users\ja\AppData\Local\Microsoft\WindowsApps;C:\Users\ja\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;C:\Users\ja\.pyenv\pyenv-win\bin;C:\Users\ja\.pyenv\pyenv-win\shims;C:\xampp\php;C:\Users\ja\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl 9 verbose lifecycle [email protected]~watch: CWD: C:\xampp\htdocs\prestashop\themes\classic\_dev 10 silly lifecycle [email protected]~watch: Args: [ '/d /s /c', 'webpack --progress --watch' ] 11 silly lifecycle [email protected]~watch: Returned: code: 2 signal: null 12 info lifecycle [email protected]~watch: Failed to exec watch script 13 verbose stack Error: [email protected] watch: `webpack --progress --watch` 13 verbose stack Exit status 2 13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:315:20) 13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:315:20) 13 verbose stack at maybeClose (internal/child_process.js:1048:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) 14 verbose pkgid [email protected] 15 verbose cwd C:\xampp\htdocs\prestashop\themes\classic\_dev 16 verbose Windows_NT 10.0.18363 17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "watch" 18 verbose node v14.15.4 19 verbose npm v6.14.10 20 error code ELIFECYCLE 21 error errno 2 22 error [email protected] watch: `webpack --progress --watch` 22 error Exit status 2 23 error Failed at the [email protected] watch script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 2, true ] I already tried to reinstall Node and webpack and also tried to run this with my antivirus off but nothing seems to work. Link to comment Share on other sites More sharing options...
elburgl69 Posted January 31, 2021 Share Posted January 31, 2021 npm install first? Link to comment Share on other sites More sharing options...
konradmistrz Posted January 31, 2021 Author Share Posted January 31, 2021 1 minute ago, elburgl69 said: npm install first? ofc I did npm install and npm run build first Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now