Open mrseankumar25 opened 1 year ago
Getting the same error. Help.
So, when divi-script will works with node 18?
@mrseankumar25 for the moment you have to use node 14.7.0 ...
So, when divi-script will works with node 18?
@mrseankumar25 for the moment you have to use node 14.7.0 ...
Is there a specific reason why we should use only a particular version? Are there any restrictions or concerns with using other versions? However, I have Node v18.8.0, npx and npm 9.7.1
So I just installed Node version 14.7.0
which solved the npx create-divi-extension
issue.
However, the yarn start
doesn't seem to build the React component correctly.
Is there any timeline on when this will be fixed? I can't seem to find any documentation on creating an extension outside of this package either.
Pretty disappointing.
Has anyone managed to get it working on the latest LTS version of node?
@OverInfinity If I remember right, my issue was caused by another process running which was conflicting with this build process.
I've found the issue. At least of what I can see this is because of node-sass being the dependency of divi-scripts. Since node-sass is deprecated I think the package.json needs to be updated with sass instead of node-sass.
@OverInfinity If I remember right, my issue was caused by another process running which was conflicting with this build process.
Very sorry @arobbins I missed your reply, thank you very much for your tip!
@OverInfinity Sorry to bug you, but can you share how you fixed this? I'm running into it again.
I opened my package.json
but I'm not seeing node-sass
listed. I'm guessing it's contained in the divi-scripts
package?
@arobbins Sorry for the confusion. I've just found the cause not the fix. I've talked to Elegant Themes and the answer I got is this project is abandoned. In addition, this will be replaced by whatever they'll release in Divi 5.0. Now what didn't sit with me well is the solution I basically got from support was just deal with it. So if I can't rely on them I won't bother fixing it and moved on from Divi.
@OverInfinity Thanks for the follow up! Good to know. Did they happen to give you a timeline for Divi 5.0?
I am looking for some guidance on how to create Divi extension. Would you be able to provide me with some assistance? Thank you so much. Currently, I am working on it in the plugins folder. Can you please let me know if it's possible to create it in the child theme? Also, could you guide me on how to create it there?
Steps To Reproduce
Error Log
Creating a new Divi extension in C:\wamp64\www\wordpress\wp-content\plugins\fdk-extension.
Installing packages. This might take a couple of minutes. Installing react, react-dom, and divi-scripts...
npm ERR! code 1 npm ERR! path C:\wamp64\www\wordpress\wp-content\plugins\fdk-extension\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:\wamp64\www\wordpress\wp-content\plugins\fdk-extension\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:\wamp64\www\wordpress\wp-content\plugins\fdk-extension\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 node-gyp@3.8.0 npm ERR! gyp info using node@18.8.0 | 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", line 1
npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:412:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! gyp ERR! System Windows_NT 10.0.22621
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\wamp64\www\wordpress\wp-content\plugins\fdk-extension\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\wamp64\www\wordpress\wp-content\plugins\fdk-extension\node_modules\node-sass
npm ERR! gyp ERR! node -v v18.8.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
which
failed Error: not found: python2 npm ERR! gyp verbwhich
failed at getNotFoundError (C:\wamp64\www\wordpress\wp-content\plugins\fdk-extension\node_modules\which\which.js:13:12) npm ERR! gyp verbwhich
failed at F (C:\wamp64\www\wordpress\wp-content\plugins\fdk-extension\node_modules\which\which.js:68:19) npm ERR! gyp verbwhich
failed at E (C:\wamp64\www\wordpress\wp-content\plugins\fdk-extension\node_modules\which\which.js:80:29) npm ERR! gyp verbwhich
failed at C:\wamp64\www\wordpress\wp-content\plugins\fdk-extension\node_modules\which\which.js:89:16 npm ERR! gyp verbwhich
failed at C:\wamp64\www\wordpress\wp-content\plugins\fdk-extension\node_modules\isexe\index.js:42:5 npm ERR! gyp verbwhich
failed at C:\wamp64\www\wordpress\wp-content\plugins\fdk-extension\node_modules\isexe\windows.js:36:5 npm ERR! gyp verbwhich
failed at FSReqCallback.oncomplete (node:fs:211:21) npm ERR! gyp verbwhich
failed python2 Error: not found: python2 npm ERR! gyp verbwhich
failed at getNotFoundError (C:\wamp64\www\wordpress\wp-content\plugins\fdk-extension\node_modules\which\which.js:13:12) npm ERR! gyp verbwhich
failed at F (C:\wamp64\www\wordpress\wp-content\plugins\fdk-extension\node_modules\which\which.js:68:19) npm ERR! gyp verbwhich
failed at E (C:\wamp64\www\wordpress\wp-content\plugins\fdk-extension\node_modules\which\which.js:80:29) npm ERR! gyp verbwhich
failed at C:\wamp64\www\wordpress\wp-content\plugins\fdk-extension\node_modules\which\which.js:89:16 npm ERR! gyp verbwhich
failed at C:\wamp64\www\wordpress\wp-content\plugins\fdk-extension\node_modules\isexe\index.js:42:5 npm ERR! gyp verbwhich
failed at C:\wamp64\www\wordpress\wp-content\plugins\fdk-extension\node_modules\isexe\windows.js:36:5 npm ERR! gyp verbwhich
failed at FSReqCallback.oncomplete (node:fs:211:21) { npm ERR! gyp verbwhich
failed code: 'ENOENT' npm ERR! gyp verbwhich
failed } npm ERR! gyp verb check python checking for Python executable "python" in the PATH npm ERR! gyp verbwhich
succeeded python C:\Users\seank\AppData\Local\Programs\Python\Python311\python.EXE npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Command failed: C:\Users\seank\AppData\Local\Programs\Python\Python311\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3]; npm ERR! gyp ERR! stack File "npm ERR! A complete log of this run can be found in: C:\Users\seank\AppData\Local\npm-cache_logs\2023-08-05T11_24_37_305Z-debug-0.log
Aborting installation. npm install --save --save-exact --loglevel error react react-dom divi-scripts has failed.
Deleting generated file... node_modules Deleting generated file... package.json Deleting fdk-extension/ from C:\wamp64\www\wordpress\wp-content\plugins Done.