Open codaski opened 3 years ago
Interesting, as this doesn't happen for me. Seems it may be related to the version of webpack. I'm running V4, I presume you must have V5.
You could try removing the --hide-modules
flag or just update the npm scripts as per the following:
https://github.com/JeffreyWay/laravel-mix/blob/628f6062cceb77610b1813e3179abcbd043a4642/UPGRADE.md#update-your-npm-scripts
when i run "npm run dev" or "npm run webpack" as you made in the video it game me the belwo error
C:\laragon\www\active\wp-content\themes\wsa>npm run dev
[webpack-cli] Error: Unknown option '--hide-modules' [webpack-cli] Run 'webpack --help' to see available commands and options npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! wp-laravel-mix-theme-boilerplate@1.0.0 dev:
cross-env NODE_ENV=development webpack --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the wp-laravel-mix-theme-boilerplate@1.0.0 dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\amahe\AppData\Roaming\npm-cache_logs\2021-07-07T11_15_31_530Z-debug.log
and the log is
0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli 'C:\laragon\bin\nodejs\node-v14\node.exe', 1 verbose cli 'C:\laragon\bin\nodejs\node-v14\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'dev' 1 verbose cli ] 2 info using npm@6.14.12 3 info using node@v14.16.1 4 verbose run-script [ 'predev', 'dev', 'postdev' ] 5 info lifecycle wp-laravel-mix-theme-boilerplate@1.0.0~predev: wp-laravel-mix-theme-boilerplate@1.0.0 6 info lifecycle wp-laravel-mix-theme-boilerplate@1.0.0~dev: wp-laravel-mix-theme-boilerplate@1.0.0 7 verbose lifecycle wp-laravel-mix-theme-boilerplate@1.0.0~dev: unsafe-perm in lifecycle true 8 verbose lifecycle wp-laravel-mix-theme-boilerplate@1.0.0~dev: PATH: C:\laragon\bin\nodejs\node-v14\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\laragon\www\active\wp-content\themes\wsa\node_modules.bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\laragon\bin\php\php-7.4.19-Win32-vc15-x64;C:\ProgramData\ComposerSetup\bin;C:\laragon\bin;C:\laragon\bin\apache\httpd-2.4.47-win64-VS16\bin;C:\laragon\bin\composer;C:\laragon\bin\git\bin;C:\laragon\bin\git\cmd;C:\laragon\bin\git\mingw64\bin;C:\laragon\bin\git\usr\bin;C:\laragon\bin\laragon\utils;C:\laragon\bin\mysql\mysql-5.7.33-winx64\bin;C:\laragon\bin\nginx\nginx-1.19.10;C:\laragon\bin\ngrok;C:\laragon\bin\nodejs\node-v14;C:\laragon\bin\notepad++;C:\laragon\bin\php\php-7.4.19-Win32-vc15-x64;C:\laragon\bin\redis\redis-x64-3.2.100;C:\laragon\bin\telnet;C:\laragon\usr\bin;C:\Users\amahe\AppData\Local\Yarn\config\global\node_modules.bin;C:\Users\amahe\AppData\Roaming\Composer\vendor\bin;C:\Users\amahe\AppData\Roaming\npm;C:\Users\amahe\AppData\Local\Microsoft\WindowsApps;C:\Users\amahe\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\JetBrains\PhpStorm 2021.1.4\bin; 9 verbose lifecycle wp-laravel-mix-theme-boilerplate@1.0.0~dev: CWD: C:\laragon\www\active\wp-content\themes\wsa 10 silly lifecycle wp-laravel-mix-theme-boilerplate@1.0.0~dev: Args: [ 10 silly lifecycle '/d /s /c', 10 silly lifecycle 'cross-env NODE_ENV=development webpack --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js' 10 silly lifecycle ] 11 silly lifecycle wp-laravel-mix-theme-boilerplate@1.0.0~dev: Returned: code: 2 signal: null 12 info lifecycle wp-laravel-mix-theme-boilerplate@1.0.0~dev: Failed to exec dev script 13 verbose stack Error: wp-laravel-mix-theme-boilerplate@1.0.0 dev: (C:\laragon\bin\nodejs\node-v14\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. (C:\laragon\bin\nodejs\node-v14\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 wp-laravel-mix-theme-boilerplate@1.0.0
15 verbose cwd C:\laragon\www\active\wp-content\themes\wsa
16 verbose Windows_NT 10.0.19042
17 verbose argv "C:\laragon\bin\nodejs\node-v14\node.exe" "C:\laragon\bin\nodejs\node-v14\node_modules\npm\bin\npm-cli.js" "run" "dev"
18 verbose node v14.16.1
19 verbose npm v6.14.12
20 error code ELIFECYCLE
21 error errno 2
22 error wp-laravel-mix-theme-boilerplate@1.0.0 dev:
cross-env NODE_ENV=development webpack --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
13 verbose stack Exit status 2 13 verbose stack at EventEmitter.cross-env NODE_ENV=development webpack --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
22 error Exit status 2 23 error Failed at the wp-laravel-mix-theme-boilerplate@1.0.0 dev script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 2, true ]