Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in installing line-in package: NodeJS

I am trying to use the line-in package to stream the input audio data as output. While installing the package, I get the error stating node-gyp rebuild command failed.

I am using NodeJS, and I really don't know why node-gyp is trying to access my python.exe file. Can anybody help me to sort this problem out?

gyp ERR! stack Error: Command failed: C:\Users\NikhileshSubramanian\AppData\Local\Programs\Python\Python37\python.EXE -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:294:12)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:962:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd F:\Topgear\SpeechToText\node_modules\line-in
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.```

like image 292
Nikhilesh A S Avatar asked Aug 31 '26 10:08

Nikhilesh A S


1 Answers

node-gyp requires python2.7:

https://github.com/nodejs/node-gyp

python (v2.7 recommended, v3.x.x is not supported)

There are some windows specific instructions that may help you:

https://github.com/nodejs/node-gyp#on-windows

like image 167
davejagoda Avatar answered Sep 02 '26 03:09

davejagoda