2

I am php developer and now i want to build project with mern.io. and getting some errors in command line, can anyone help me to get out of these or let me know why these errors are showing up. I installed node.js,git and python.

I wrote the following commands.

npm install -g mern-cli
mern init your_new_app
cd your_new_app
npm install

Following errors are showing in cmd.

gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\JAVED\AppData\Local\Programs\Python\Python36-32\python.EXE", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.15063
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 D:\mern\node_modules\nodejieba
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Javed Iqbal
  • 156
  • 10

2 Answers2

1

I guess your system lacks the python, Kindly install python dependecy and then try to install the same. You may refer python installation procedure @ https://www.howtogeek.com/197947/how-to-install-python-on-windows/

Vipul Patil
  • 1,250
  • 15
  • 27
  • I also use the following command npm install --global --production windows-build-tools That i get from the following link https://github.com/nodejs/node-gyp Python is installed successfully.But still i can not not install mern. – Javed Iqbal Apr 03 '18 at 11:41
  • Did you added python env variable ? If not then please try to do it so. You may refer https://stackoverflow.com/questions/3701646/how-to-add-to-the-pythonpath-in-windows-7 – Vipul Patil Apr 03 '18 at 11:45
0

What version of python do you have? I'm running into the exact same error and after some googling I found this https://github.com/nodejs/node-gyp/issues/1337

It seems node-gyp doesn't support python 3. Unfortunately after reading through the entire thread, I couldn't find a solution other than downgrading to python 2.7

ssj_100
  • 149
  • 1
  • 11