Open BienvenidoBoriko opened 1 year ago
It isn't problem of Elegantthemes, just node-sass. They use python2 to build package what's more python2 is deprecate. This question I recommend move here https://github.com/sass/node-sass/issues
and to skip your problem:
# Start from the official Node.js 14 image
FROM node:14
# Install Python 2
RUN apt-get update && apt-get install -y python2
# Set the working directory
WORKDIR /usr/src/app
# Install create-divi-extension globally
RUN npm install --global create-divi-extension
In your CLI: docker run -v ./:/usr/src/app my-divi-extension-image npx create-divi-extension my-extension
Problem Description
Error trying to run the command npx create-divi-extension simartour-travel
Creating a new Divi extension in /home/bb/Documents/simartour/wp-content/plugins/simartour-travel.
Installing packages. This might take a couple of minutes. Installing react, react-dom, and divi-scripts...
npm ERR! code 1 npm ERR! path /home/bb/Documents/simartour/wp-content/plugins/simartour-travel/node_modules/node-sass npm ERR! command failed npm ERR! command sh -c -- node scripts/build.js npm ERR! Building: /usr/bin/node /home/bb/Documents/simartour/wp-content/plugins/simartour-travel/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 '/usr/bin/node', npm ERR! gyp verb cli '/home/bb/Documents/simartour/wp-content/plugins/simartour-travel/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@20.2.0 | linux | 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:419:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:511:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1098:16)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:304:5)
npm ERR! gyp ERR! System Linux 6.1.31-2-MANJARO
npm ERR! gyp ERR! command "/usr/bin/node" "/home/bb/Documents/simartour/wp-content/plugins/simartour-travel/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /home/bb/Documents/simartour/wp-content/plugins/simartour-travel/node_modules/node-sass
npm ERR! gyp ERR! node -v v20.2.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 (/home/bb/Documents/simartour/wp-content/plugins/simartour-travel/node_modules/which/which.js:13:12) npm ERR! gyp verbwhich
failed at F (/home/bb/Documents/simartour/wp-content/plugins/simartour-travel/node_modules/which/which.js:68:19) npm ERR! gyp verbwhich
failed at E (/home/bb/Documents/simartour/wp-content/plugins/simartour-travel/node_modules/which/which.js:80:29) npm ERR! gyp verbwhich
failed at /home/bb/Documents/simartour/wp-content/plugins/simartour-travel/node_modules/which/which.js:89:16 npm ERR! gyp verbwhich
failed at /home/bb/Documents/simartour/wp-content/plugins/simartour-travel/node_modules/isexe/index.js:42:5 npm ERR! gyp verbwhich
failed at /home/bb/Documents/simartour/wp-content/plugins/simartour-travel/node_modules/isexe/mode.js:8:5 npm ERR! gyp verbwhich
failed at FSReqCallback.oncomplete (node:fs:198:21) npm ERR! gyp verbwhich
failed python2 Error: not found: python2 npm ERR! gyp verbwhich
failed at getNotFoundError (/home/bb/Documents/simartour/wp-content/plugins/simartour-travel/node_modules/which/which.js:13:12) npm ERR! gyp verbwhich
failed at F (/home/bb/Documents/simartour/wp-content/plugins/simartour-travel/node_modules/which/which.js:68:19) npm ERR! gyp verbwhich
failed at E (/home/bb/Documents/simartour/wp-content/plugins/simartour-travel/node_modules/which/which.js:80:29) npm ERR! gyp verbwhich
failed at /home/bb/Documents/simartour/wp-content/plugins/simartour-travel/node_modules/which/which.js:89:16 npm ERR! gyp verbwhich
failed at /home/bb/Documents/simartour/wp-content/plugins/simartour-travel/node_modules/isexe/index.js:42:5 npm ERR! gyp verbwhich
failed at /home/bb/Documents/simartour/wp-content/plugins/simartour-travel/node_modules/isexe/mode.js:8:5 npm ERR! gyp verbwhich
failed at FSReqCallback.oncomplete (node:fs:198: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 /usr/bin/python npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Command failed: /usr/bin/python -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: npm ERR! /home/bb/.npm/_logs/2023-07-05T10_18_35_805Z-debug-0.log
Aborting installation. npm install --save --save-exact --loglevel error react react-dom divi-scripts has failed.
Deleting generated file... package.json Deleting simartour-travel/ from /home/bb/Documents/simartour/wp-content/plugins Done.
you should update your node sass
Steps To Reproduce
1.
Screenshot and/or gif