RCeyda
RCeyda

Reputation: 123

How can I solve node-gyp version problem at Coreui Project?

I'm working at vue/coreui project that needs libraries like npm, node-sass, node-gyp. But when I'm installing node packages, I'm getting error like below. We are also using python3.11. I didn't solve the problem. I don't have much experiences at this subject. Can you give me ideas please?

check python checking for Python executable "python3" in the PATH
gyp verb `which` succeeded python3 /usr/bin/python3
gyp ERR! configure error 
gyp ERR! stack Error: Command failed: /usr/bin/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
gyp ERR! stack 
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:383:12)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at maybeClose (internal/child_process.js:1088:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
gyp ERR! System Linux 6.1.0-21-amd64
gyp ERR! command "/root/.nvm/versions/node/v14.21.3/bin/node" "/home/web3/web/.../node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/web3/web/.../node_modules/node-sass
gyp ERR! node -v v14.21.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
Build failed with error code: 1

my package.json is

...
    ...
    "axios": "^0.21.1",
    "dotenv": "^8.2.0",
    "file-loader": "^6.0.0",
    "filerobot-image-editor": "^4.5.1",
    "jquery": "^3.5.1",
    "moment-timezone": "^0.5.31",
    "quill": "~1.3.7",
    "react-filerobot-image-editor": "^4.5.1",
    "serve": "^11.3.2",
    "socket.io-client": "^4.7.1",
    "spinkit": "~2.0.1",
    "trumbowyg": "^2.21.0",
    "v-calendar": "^1.0.8",
    "vue": "^2.6.11",
    "vue-codemirror": "~4.0.6",
    "vue-grid-layout": "^2.3.8",
    "vue-moment": "^4.1.0",
    "vue-multiselect": "~2.1.6",
    "vue-progressbar": "^0.7.5",
    "vue-quill-editor": "~3.0.6",
    "vue-resource": "^1.5.1",
    "vue-resource-progressbar-interceptor": "^1.1.9",
    "vue-router": "~3.1.6",
    "vue-select": "^3.10.7",
    "vue-simple-calendar": "~4.3.2",
    "vue-text-mask": "~6.1.2",
    "vue-toastr": "^2.1.2",
    "vue-trumbowyg": "^3.6.0",
    "vue2-dropzone": "^3.6.0",
    "vue2-google-maps": "~0.10.7",
    "vuedraggable": "^2.24.0",
    "vuelidate": "~0.7.5",
    "vuex": "~3.1.3"
  },
  "devDependencies": {
    ...
    "node-sass": "~4.13.1",
    "npm-run-all": "~4.1.5",
    "sass-loader": "~8.0.2",
    "vue-template-compiler": "~2.6.11"
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not ie <= 9"
  ],
  "engines": {
    "node": ">= 8.10.x",
    "npm": ">= 5.6.0"
  }

Upvotes: 0

Views: 57

Answers (1)

yoduh
yoduh

Reputation: 14649

Download Python 2, but also downgrade Node. I tested installing your list of dependencies and found success only after I downgraded to latest release of Node 12 (12.22.12)

Upvotes: 1

Related Questions