While working on the final project, I was trying to solve an invalid ELF header. Searched online how to fix it and it came up to remove node modules and reinstall. Upon doing that I came up with the issue that the only dependency I cant reinstall is better-sqlite3
What does the error say is happening?
err code 1 reads: code 1 command failed" occurs when you aren't able to install a specific NPM package or a specific version of an NPM package with your version of Node. js
What do you think the error means?
I believe that it is an issue with using a mac vs windows build, as our group member with a mac can still install the package and run "node server.js"
Command string
npm install better-sqlite3
Error log
npm ERR! code 1
npm ERR! path /mnt/c/Users/Corbin Jude/workspace/a99-group20-finalproject/node_modules/better-sqlite3
npm ERR! command failed
npm ERR! command sh /tmp/install-c1818011.sh
npm ERR! prebuild-install warn install No prebuilt binaries found (target=19.2.0 runtime=node arch=x64 libc= platform=linux)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@19.2.0 | linux | x64
npm ERR! gyp info find Python using Python version 3.10.4 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/mnt/c/Users/Corbin Jude/workspace/a99-group20-finalproject/node_modules/better-sqlite3/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/.cache/node-gyp/19.2.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/19.2.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/19.2.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/mnt/c/Users/Corbin Jude/workspace/a99-group20-finalproject/node_modules/better-sqlite3',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: not found: make
npm ERR! gyp ERR! stack at getNotFoundError (/root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/which/which.js:10:17)
npm ERR! gyp ERR! stack at /root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/which/which.js:57:18
npm ERR! gyp ERR! stack at new Promise ()
npm ERR! gyp ERR! stack at step (/root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/which/which.js:54:21)
npm ERR! gyp ERR! stack at /root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/which/which.js:71:22
npm ERR! gyp ERR! stack at new Promise ()
npm ERR! gyp ERR! stack at subStep (/root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/which/which.js:69:33)
npm ERR! gyp ERR! stack at /root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/which/which.js:80:22
npm ERR! gyp ERR! stack at /root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack at /root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
npm ERR! gyp ERR! System Linux 5.10.16.3-microsoft-standard-WSL2
npm ERR! gyp ERR! command "/mnt/c/Users/Corbin Jude/workspace/a99-group20-finalproject/node_modules/node/bin/node" "/root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
npm ERR! gyp ERR! cwd /mnt/c/Users/Corbin Jude/workspace/a99-group20-finalproject/node_modules/better-sqlite3
npm ERR! gyp ERR! node -v v19.2.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
Node.js version
v16.17.0
Operating system
Linux UNC-R90YENM1 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
What is happening?
While working on the final project, I was trying to solve an invalid ELF header. Searched online how to fix it and it came up to remove node modules and reinstall. Upon doing that I came up with the issue that the only dependency I cant reinstall is better-sqlite3
What does the error say is happening?
err code 1 reads: code 1 command failed" occurs when you aren't able to install a specific NPM package or a specific version of an NPM package with your version of Node. js
What do you think the error means?
I believe that it is an issue with using a mac vs windows build, as our group member with a mac can still install the package and run "node server.js"
Command string
npm install better-sqlite3
Error log
npm ERR! code 1 npm ERR! path /mnt/c/Users/Corbin Jude/workspace/a99-group20-finalproject/node_modules/better-sqlite3 npm ERR! command failed npm ERR! command sh /tmp/install-c1818011.sh npm ERR! prebuild-install warn install No prebuilt binaries found (target=19.2.0 runtime=node arch=x64 libc= platform=linux) npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.0.0 npm ERR! gyp info using node@19.2.0 | linux | x64 npm ERR! gyp info find Python using Python version 3.10.4 found at "/usr/bin/python3" npm ERR! gyp info spawn /usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/mnt/c/Users/Corbin Jude/workspace/a99-group20-finalproject/node_modules/better-sqlite3/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/root/.cache/node-gyp/19.2.0/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/19.2.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/19.2.0/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/mnt/c/Users/Corbin Jude/workspace/a99-group20-finalproject/node_modules/better-sqlite3', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: not found: make npm ERR! gyp ERR! stack at getNotFoundError (/root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/which/which.js:10:17) npm ERR! gyp ERR! stack at /root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/which/which.js:57:18 npm ERR! gyp ERR! stack at new Promise ()
npm ERR! gyp ERR! stack at step (/root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/which/which.js:54:21)
npm ERR! gyp ERR! stack at /root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/which/which.js:71:22
npm ERR! gyp ERR! stack at new Promise ()
npm ERR! gyp ERR! stack at subStep (/root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/which/which.js:69:33)
npm ERR! gyp ERR! stack at /root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/which/which.js:80:22
npm ERR! gyp ERR! stack at /root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack at /root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
npm ERR! gyp ERR! System Linux 5.10.16.3-microsoft-standard-WSL2
npm ERR! gyp ERR! command "/mnt/c/Users/Corbin Jude/workspace/a99-group20-finalproject/node_modules/node/bin/node" "/root/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
npm ERR! gyp ERR! cwd /mnt/c/Users/Corbin Jude/workspace/a99-group20-finalproject/node_modules/better-sqlite3
npm ERR! gyp ERR! node -v v19.2.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
Node.js version
v16.17.0
Operating system
Linux UNC-R90YENM1 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux