I am trying to install and run a react project which I bought from the internet. wheever, I run npm install I get the following error
gyp verb `which` failed code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python /home/AzureUser/Python3/python
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /home/AzureUser/Python3/python -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:198:13)
gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
gyp ERR! System Linux 4.18.0-193.6.3.el8_2.x86_64
gyp ERR! command "/usr/bin/node" "/var/tmp/thermo-api/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /var/tmp/thermo-api/node_modules/node-sass
gyp ERR! node -v v10.21.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
I am very new to node.js and I am not sure what is wrong?
Related
I'm trying to use node-gyp rebuild, but I encountered a weird issue.
I think I have followed almost every thread.
I am running the command on macOS BigSur 11.2.2, Apple Silicon.
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: null
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (node:events:376:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:284:12)
gyp ERR! System Darwin 20.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/.../Path
gyp ERR! node -v v15.5.1
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\balaji\AppData\Local\Programs\Python\Python36-32", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (F:\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (F:\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at F:\node_modules\graceful-fs\polyfills.js:282:31
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "F:\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd F:\angular\invoice-processing-office\invoice-proccessing\node_modules\#angular-devkit\build-angular\node_modules\node-sass
gyp ERR! node -v v10.11.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
I have tried npm install node-sass but no luck.
I am trying to install the following node module:
https://www.npmjs.com/package/player
Upon trying to install it with the command
npm install player
I get the following wall of error outputs:
C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots>npm install player
> lame#1.2.3 install C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\lame
> node-gyp rebuild
C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\lame>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Python executable "python" is v3.4.4, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at failPythonVersion (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:121:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:110:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:204:7)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at maybeClose (internal/child_process.js:821:16)
gyp ERR! stack at Socket.<anonymous> (internal/child_process.js:319:11)
gyp ERR! stack at emitOne (events.js:90:13)
gyp ERR! stack at Socket.emit (events.js:182:7)
gyp ERR! stack at Pipe._onclose (net.js:469:12)
gyp ERR! System Windows_NT 10.0.10586
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 C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\lame
gyp ERR! node -v v5.5.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:lame#1.2.3 lame#1.2.3 install: `node-gyp rebuild`
npm WARN install:lame#1.2.3 Exit status 1
> speaker#0.2.6 install C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\speaker
> node-gyp rebuild
C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\speaker>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Python executable "python" is v3.4.4, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at failPythonVersion (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:121:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:110:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:204:7)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at maybeClose (internal/child_process.js:821:16)
gyp ERR! stack at Socket.<anonymous> (internal/child_process.js:319:11)
gyp ERR! stack at emitOne (events.js:90:13)
gyp ERR! stack at Socket.emit (events.js:182:7)
gyp ERR! stack at Pipe._onclose (net.js:469:12)
gyp ERR! System Windows_NT 10.0.10586
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 C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\speaker
gyp ERR! node -v v5.5.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:speaker#0.2.6 speaker#0.2.6 install: `node-gyp rebuild`
npm WARN install:speaker#0.2.6 Exit status 1
> bufferutil#1.2.1 install C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\ws\node_modules\bufferutil
> node-gyp rebuild
C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\ws\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Python executable "python" is v3.4.4, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at failPythonVersion (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:121:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:110:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:204:7)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at maybeClose (internal/child_process.js:821:16)
gyp ERR! stack at Socket.<anonymous> (internal/child_process.js:319:11)
gyp ERR! stack at emitOne (events.js:90:13)
gyp ERR! stack at Socket.emit (events.js:182:7)
gyp ERR! stack at Pipe._onclose (net.js:469:12)
gyp ERR! System Windows_NT 10.0.10586
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 C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v5.5.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:bufferutil#1.2.1 bufferutil#1.2.1 install: `node-gyp rebuild`
npm WARN install:bufferutil#1.2.1 Exit status 1
> utf-8-validate#1.2.1 install C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\ws\node_modules\utf-8-validate
> node-gyp rebuild
C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\ws\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Python executable "python" is v3.4.4, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at failPythonVersion (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:121:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:110:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:204:7)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at maybeClose (internal/child_process.js:821:16)
gyp ERR! stack at Socket.<anonymous> (internal/child_process.js:319:11)
gyp ERR! stack at emitOne (events.js:90:13)
gyp ERR! stack at Socket.emit (events.js:182:7)
gyp ERR! stack at Pipe._onclose (net.js:469:12)
gyp ERR! System Windows_NT 10.0.10586
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 C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\ws\node_modules\utf-8-validate
gyp ERR! node -v v5.5.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:utf-8-validate#1.2.1 utf-8-validate#1.2.1 install: `node-gyp rebuild`
npm WARN install:utf-8-validate#1.2.1 Exit status 1
C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots
└── (empty)
npm WARN ENOENT ENOENT: no such file or directory, open 'C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\package.json'
npm WARN ENOENT ENOENT: no such file or directory, open 'C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\utf-8-validate\package.json'
npm WARN ENOENT ENOENT: no such file or directory, open 'C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\bufferutil\package.json'
npm WARN EPACKAGEJSON PinkstarTVBots No description
npm WARN EPACKAGEJSON PinkstarTVBots No repository field.
npm WARN EPACKAGEJSON PinkstarTVBots No README data
npm WARN EPACKAGEJSON PinkstarTVBots No license field.
npm ERR! code 1
C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots>
Im unable to figure out from this errors what's causing the problem. I tried already to install node-gyp, which worked, but didn't change anything.
It seems that the version that you are using/installed in your system is not supported.
gyp ERR! stack Error: Python executable "python" is v3.4.4, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
Try to install a version of Python lower than 3.0.0 and greater than 2.5.0. It should solve the issue.
In the GitHub page of node-gyp they recommend Python v2.7
when I make sudo npm rebuild initially everything works correctly but then I get this type of error:
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 3.13.0-63-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/.../.../node_modules/pg
gyp ERR! node -v v0.10.40
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
How can I fix this issue?
I am using windows 7, and get this error when doing
npm install protobuf
D:\Projects\EventstoreSample\node_modules\protobuf>node "C:\Program Files\nodejs
\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js"
rebuild
gyp ERR! configure error
gyp ERR! stack Error: Command failed: File "<string>", line 1
gyp ERR! stack import platform; print platform.python_version();
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:540:15)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at maybeClose (child_process.js:638:16)
gyp ERR! stack at Process._handle.onexit (child_process.js:680:5)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Projects\EventstoreSample\node_modules\protobuf
My pythonpath variable in environment variables, is set to :
"C:\Python33\Lib;C:\Python33\DLLs;"
On typing python in my command prompt takes me to python shell.
How do I fix this issue?
PS : I have never used python. Installed it because of this dependency.