Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gyp ERR! when building assets #210

Open
jmnda-dev opened this issue Jun 15, 2022 · 0 comments
Open

gyp ERR! when building assets #210

jmnda-dev opened this issue Jun 15, 2022 · 0 comments

Comments

@jmnda-dev
Copy link

I encountered this issue when building the assets. I run the make build-assets and got the following in my logs:

...
...
npm info run [email protected] postinstall { code: 0, signal: null }
npm timing build:run:postinstall:node_modules/bootstrap-vue Completed in 756ms
npm timing reify:rollback:createSparse Completed in 564ms
npm timing reify:rollback:retireShallow Completed in 28ms
npm timing command:install Completed in 73345ms
npm verb stack Error: command failed
npm verb stack     at ChildProcess.<anonymous> (/home/jachin/.asdf/installs/nodejs/16.15.1/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:63:27)
npm verb stack     at ChildProcess.emit (node:events:527:28)
npm verb stack     at maybeClose (node:internal/child_process:1092:16)
npm verb stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm verb pkgid [email protected]
npm verb cwd /home/jachin/WORKSPACE/djaoapp2
npm verb Linux 5.17.12-300.fc36.x86_64
npm verb node v16.15.1
npm verb npm  v8.11.0
npm ERR! code 1
npm ERR! path /home/jachin/WORKSPACE/djaoapp2/installTop/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /home/jachin/.asdf/installs/nodejs/16.15.1/bin/node /home/jachin/WORKSPACE/djaoapp2/installTop/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   '/home/jachin/.asdf/installs/nodejs/16.15.1/bin/node',
npm ERR! gyp verb cli   '/home/jachin/WORKSPACE/djaoapp2/installTop/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] | 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 `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (/home/jachin/WORKSPACE/djaoapp2/installTop/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/home/jachin/WORKSPACE/djaoapp2/installTop/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/home/jachin/WORKSPACE/djaoapp2/installTop/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /home/jachin/WORKSPACE/djaoapp2/installTop/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /home/jachin/WORKSPACE/djaoapp2/installTop/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /home/jachin/WORKSPACE/djaoapp2/installTop/node_modules/isexe/mode.js:8: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 (/home/jachin/WORKSPACE/djaoapp2/installTop/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/home/jachin/WORKSPACE/djaoapp2/installTop/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/home/jachin/WORKSPACE/djaoapp2/installTop/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /home/jachin/WORKSPACE/djaoapp2/installTop/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /home/jachin/WORKSPACE/djaoapp2/installTop/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /home/jachin/WORKSPACE/djaoapp2/installTop/node_modules/isexe/mode.js:8: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` succeeded python /home/jachin/WORKSPACE/djaoapp2/installTop/bin/python
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: Command failed: /home/jachin/WORKSPACE/djaoapp2/installTop/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack   File "<string>", 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:398:12)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1092:16)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! gyp ERR! System Linux 5.17.12-300.fc36.x86_64
npm ERR! gyp ERR! command "/home/jachin/.asdf/installs/nodejs/16.15.1/bin/node" "/home/jachin/WORKSPACE/djaoapp2/installTop/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /home/jachin/WORKSPACE/djaoapp2/installTop/node_modules/node-sass
npm ERR! gyp ERR! node -v v16.15.1
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 verb exit 1
npm timing npm Completed in 73444ms
npm verb unfinished npm timer reify 1655294001514
npm verb unfinished npm timer reify:build 1655294072138
npm verb unfinished npm timer build 1655294072139
npm verb unfinished npm timer build:deps 1655294072139
npm verb unfinished npm timer build:run:postinstall 1655294073983
npm verb unfinished npm timer build:run:postinstall:node_modules/node-sass 1655294073993
npm verb code 1

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jachin/WORKSPACE/djaoapp2/installTop/.npm/_logs/2022-06-15T11_53_21_422Z-debug-0.log

After searching for a solution, I stumbled upon suggestions that I need to downgrade node to version 14. I downgraded from node 16.15.1 to 14.19.3 using asdf and the asset build was successful.

Am still interested as to why was not working with node 16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant