Skip to content
Advertisement

npm install failing due to Python executable – React Template

Good day

I have purchased a React template that I am trying to get up and running locally. When I run an ‘npm i’ command, I get the following error message:

JavaScript

I have installed the latest version of Python from here: https://www.python.org/downloads/

And have updated my environment variables (both the ‘User variables’ as well as the ‘System Variables”) to include the path that it was installed to: enter image description here enter image description here enter image description here

I would be extremely grateful if anyone might have some advice on why this is failing, and what I might be doing wrong.

Advertisement

Answer

Thank you for everyone’s suggestions. I have been able to resolve my build failure through a combination form the advice gained from the links provided. Here follows the steps I implemented:

  • I downgraded to Python 2.7
  • I ensured that ‘C:Python27’ was towards the top of my Windows Environment variables
  • I installed Windows build tools with npm install –global –production windows-build-tools@4.0.0
  • I deleted my package-lock.json file and ran npm i once more

After these steps, my solution builds and runs.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement