Verbose output (from npm or node-gyp):
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 50, in <module>
sys.exit(gyp.script_main())
File "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 554, in script_main
return main(sys.argv[1:])
File "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 547, in main
return gyp_main(args)
File "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 520, in gyp_main
[generator, flat_list, targets, data] = Load(
File "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 136, in Load
result = gyp.input.Load(build_files, default_variables, includes[:],
File "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2778, in Load
LoadTargetBuildFile(build_file, data, aux_data,
File "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 416, in LoadTargetBuildFile
ProcessVariablesAndConditionsInDict(
File "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 1295, in ProcessVariablesAndConditionsInDict
ProcessVariablesAndConditionsInList(value, phase, variables,
File "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 1311, in ProcessVariablesAndConditionsInList
ProcessVariablesAndConditionsInDict(item, phase, variables, build_file)
File "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 1295, in ProcessVariablesAndConditionsInDict
ProcessVariablesAndConditionsInList(value, phase, variables,
File "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 1315, in ProcessVariablesAndConditionsInList
expanded = ExpandVariables(item, phase, variables, build_file)
File "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 914, in ExpandVariables
sys.stderr.write(p_stderr)
TypeError: write() argument must be str, not bytes while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack
TypeError: write() argument must be str, not bytes while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 3.18.137-g72a7a64494e
gyp ERR! command "/data/data/com.termux/files/usr/bin/node" "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /data/data/com.termux/files/home/oasis/node_modules/sodium-native
gyp ERR! node -v v13.0.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
Please upgrade https://github.com/nodejs/node-gyp/releases so you get the Python 3 compatibility fixes at https://github.com/nodejs/node-gyp/blame/master/gyp/pylib/gyp/input.py#L914-L917
Thank you! npm -g install npm did the trick.
Most helpful comment
Thank you!
npm -g install npmdid the trick.