Hello!
Total noob here.
For a while I had my site hosted both here and on GitLab pages. Using near identical scripts:
// from package.json
// .. inside "scripts"
"generate:gitlab-pages": "DEPLOY_ENV=GITLAB_PAGES nuxt generate",
"generate:netlify": "DEPLOY_ENV=NETLIFY nuxt generate",
The difference between the two being the configuration of the baseurl (as GitLab pages is namespaced).
Aside from that they are identical. It works on Netlify. Fails on GitLab. The error on GitLab is:
...
npm ERR! code 1
52npm ERR! path /builds/MyUsername/my-project-name/node_modules/deasync
53npm ERR! command failed
54npm ERR! command sh -c node ./build.js
55npm ERR! gyp info it worked if it ends with ok
56npm ERR! gyp info using node-gyp@3.8.0
57npm ERR! gyp info using node@17.2.0 | linux | x64
58npm ERR! gyp ERR! configure error
59npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
60npm ERR! gyp ERR! stack at PythonFinder.failNoPython (/builds/MyUsername/my-project-name/node_modules/node-gyp/lib/configure.js:484:19)
61npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (/builds/MyUsername/my-project-name/node_modules/node-gyp/lib/configure.js:406:16)
62npm ERR! gyp ERR! stack at F (/builds/MyUsername/my-project-name/node_modules/node-gyp/node_modules/which/which.js:68:16)
63npm ERR! gyp ERR! stack at E (/builds/MyUsername/my-project-name/node_modules/node-gyp/node_modules/which/which.js:80:29)
64npm ERR! gyp ERR! stack at /builds/MyUsername/my-project-name/node_modules/node-gyp/node_modules/which/which.js:89:16
65npm ERR! gyp ERR! stack at /builds/MyUsername/my-project-name/node_modules/isexe/index.js:42:5
66npm ERR! gyp ERR! stack at /builds/MyUsername/my-project-name/node_modules/isexe/mode.js:8:5
67npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:198:21)
68npm ERR! gyp ERR! System Linux 5.4.109+
69npm ERR! gyp ERR! command "/usr/local/bin/node" "/builds/MyUsername/my-project-name/node_modules/.bin/node-gyp" "rebuild"
70npm ERR! gyp ERR! cwd /builds/MyUsername/my-project-name/node_modules/deasync
71npm ERR! gyp ERR! node -v v17.2.0
72npm ERR! gyp ERR! node-gyp -v v3.8.0
73npm ERR! gyp ERR! not ok
74npm ERR! Build failed
75npm ERR! A complete log of this run can be found in:
76npm ERR! /root/.npm/_logs/2021-12-07T00_25_59_323Z-debug.log
78
Cleaning up project directory and file based variables
00:00
80ERROR: Job failed: exit code 1
What do I do?
I don’t know enough to begin even trying to debug. I googled the python thing and StackOverflow says something about maybe NPM v16? Not sure.