WPGulp
WPGulp copied to clipboard
Error running `npx wpgulp` (Windows)
Hello,
I have been trying to get past the first step, but running npx wpgulp
(on Windows) just results in a barrage of errors for me.
(I am more than happy to pay for the time to provide support / or cover the cost of an hour's maintenance).
Please find the first screenshot of running the command, followed by two screenshots of errors:
You can see various versions, of npx, node and npm below:
I've also attached below the error log from \AppData\Local\npm-cache\_logs
:
2022-04-19T07_45_20_081Z-debug-0.log
I would very much appreciate some guidance.
Thanks again and kindest regards, Elliott
I just tried uninstalling Node and reinstalling the LTS version 16.14.2, but it results in the same errors.
I have the same errors, well... smilar, but even more. I've uninstalled all node modules, deleted all .json files and started fresh so:
npm init -y
npx wpgulp
Bur nothing good is happening apart of errors and lot of deprecated packages warnings, is this tool still a good way to go in 2022 for WordPress development? I was using @wordpress/scripts before to bundle my files and all was working fine. Anyone have solved this? Below is my full error log showing all commands starting from clean slate:
C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite>npm init -y
Wrote to C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\package.json:
{
"name": "testsite",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Maryanos/testsite-simple.git"
Installing WPGulp in directory: C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite
This might take a couple of minutes.
√ DOWNLOADED WPGulp files
\ INSTALLING npm packages…
× UNHANDLED ERROR
× ERROR → Error
i REASON → Command failed: npm install
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: This package has been deprecated, please use @wordpress/eslint-plugin or @wordpress/scripts
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm ERR! code 1
npm ERR! path C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\Users\\info\\Local Sites\\testsite\\app\\public\\wp-content\\themes\\testsite\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed python Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb could not find "python". checking python launcher
npm ERR! gyp verb could not find "python". guessing location
npm ERR! gyp verb ensuring that file exists: C:\Python27\python.exe
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack at PythonFinder.failNoPython (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\lib\configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\lib\configure.js:509:16)
npm ERR! gyp ERR! stack at callback (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\graceful-fs\polyfills.js:306:20)
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\info\\Local Sites\\testsite\\app\\public\\wp-content\\themes\\testsite\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\info\AppData\Local\npm-cache\_logs\2022-04-21T10_59_35_969Z-debug-0.log
i ERROR STACK ↓
Error: Command failed: npm install
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: This package has been deprecated, please use @wordpress/eslint-plugin or @wordpress/scripts
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm ERR! code 1
npm ERR! path C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\Users\\info\\Local Sites\\testsite\\app\\public\\wp-content\\themes\\testsite\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed python Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb could not find "python". checking python launcher
npm ERR! gyp verb could not find "python". guessing location
npm ERR! gyp verb ensuring that file exists: C:\Python27\python.exe
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack at PythonFinder.failNoPython (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\lib\configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-gyp\lib\configure.js:509:16)
npm ERR! gyp ERR! stack at callback (C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\graceful-fs\polyfills.js:306:20)
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\info\\Local Sites\\testsite\\app\\public\\wp-content\\themes\\testsite\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\info\AppData\Local\npm-cache\_logs\2022-04-21T10_59_35_969Z-debug-0.log
at makeError (C:\Users\info\AppData\Local\npm-cache\_npx\5196e799d8ac98da\node_modules\execa\index.js:174:9)
at C:\Users\info\AppData\Local\npm-cache\_npx\5196e799d8ac98da\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async C:\Users\info\AppData\Local\npm-cache\_npx\5196e799d8ac98da\node_modules\wpgulp\installer\index.js:58:3
C:\Users\info\Local Sites\testsite\app\public\wp-content\themes\testsite>
Same issue on MacOS. First tried on 16.15.1 LTS then uninstalled it and installed 18.3.0 — no result.
I have both macOS and Windows and can't get it to work on either, just resorted to my own Gulp.js config for the time-being, but would've loved to switch over to WP Gulp.
Not sure, if it is related, but nobody mentioned it.
It's just a guess, but all the errors about missing Python (like: Error: Can't find Python executable "python", you can set the PYTHON env variable.) may suggest, that Python is missing.
IIRC, gyp is a python script, that helps NPM on Windows to work.
Have you python installed?
Have you python installed? No actually I did not had Python installed that time and this could be the reason so thanks for pointing that out, but I have decided to not use the Gulp and invest my time in webpack.
I was able to get it to work by uninstalling gulp-sass and replacing it with gulp-dart-sass (there may be other sass modules that would work as well). (don't forget to update the require line in the gulpfile too)
Have you python installed? No actually I did not had Python installed that time and this could be the reason so thanks for pointing that out, but I have decided to not use the Gulp and invest my time in webpack.
Awais's build uses Python2, so you have to configure that first.
I'd prefer not to get my hands dirty with different versions of Python so I'm looking for simpler solutions.
Try using nvm
, and node 14.15.3
(Or whatever the best version is there.) Works for me!
Hopefully someone finds this helpful in the feature... I believe the issue is being caused by node-sass. I followed the recommendations from @WiseArts. But thought I would break it down more fully for those like me!
- Ran npx wpgulp - got the error message. Came to Github found this issue.
- Ran npm uninstall gulp-sass
- Ran npm install gulp-dart-sass --save-dev
- Updated the const in gulpfile.babel.js - from require("gulp-sass"); to require("gulp-dart-sass");
- Had to update the outputStyle const in the wpgulp.config.js file from compact to compressed. (you may or may not have to do this step.)
- npm start - start building the greatest WP theme ever!
I hope this helps someone.
Thank you @wkjones, glad you got it going. Hope your project goes well! 🎉
I got the same errors when installing, but had issues compiling after following @wkjones steps.
So I went back and ran
-
npm uninstall gulp-dart-sass
-
npm install gulp-sass --save-dev
-
npm install sass --save-dev
- In gulpfile.babel.js changed
require("gulp-dart-sass")
torequire("gulp-sass")(require("sass"))
Oddly, there are no issues going back after getting it installed in the first place.
An other solution for the issue. Use nvm to switch between node versions. Use node 14.15.3 or similar and you will not get any errors.
To be honest, I wish I just rolled my own. It took far too long to get this working. It's good now and I've changed the config to compile any scss files rather than just one. Not sure exactly how the vendor js is supposed to work but it doesn't.
use node version manager (nvm) switch node version 14 it's work for me