-
-
Notifications
You must be signed in to change notification settings - Fork 848
Closed
Labels
Description
Building the sqlite3 package during the installation process fails with the following message:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@14.15.4 | linux | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@14.15.4 | linux | x64
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /usr/bin/python3.8 -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: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:308:12)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
gyp ERR! System Linux 4.19.128-microsoft-standard
The problem is that the used node-gyp version defined in the package.json (3.x) is from 2018 and does not work with python 3, See issue #1965 from the node-gyp project. Changing the version (to use the current version at this moment 7.1.2) built with no errors.
If it still doesn't work and you see the following line /bin/sh: 1: python: not found, you may need to set the PYTHON env variables, configure python in your npm config file or install sudo apt install python-is-python3
By the way the package node-pre-gyp is deprecated, this is the new one.
wald-tq, sebaspf, dlguswo333, theoludwig, jhargis and 5 more