Open AlinCiocan opened 2 years ago
Sharp strikes again! Thanks for providing the stack trace. I searched and found a thread that looks very similar: https://stackoverflow.com/questions/57217251/getting-gyp-err-stack-syntaxerror-invalid-syntax-while-executing-npm-insta?noredirect=1&lq=1
The OP said they resolved it by installing a specific version of Python 2. 🤷🏻♀️ What version of Python is running on your machine?
Actually this error got resolved after installing Python 2 (exact version - 2.7.15) and pointing the environment variable PYTHON to C:\Python27\python.exe
You are right, I have Python version 3.9.4
I have installed also Python 2.7.15 and then run npm install --force
, however I got the same error, because the npm still uses the Python3.
Environment variables:
Npm error (using Python3):
@AlinCiocan Try an earlier version of node. I've seen these issues, and switching to node 14 has fixed everything for me.
I ran into npm install
issues as well on an M1 Mac. Using Node 14 did the trick, but in order to install it, I had to run nvm install 14
with Rosetta.
Tried an earlier version of node, switching to node 14. Still no progress and cant use the course materials to progress.
I tried to remove
package-lock.json
, donpm install --force
andnpm install --legacy-peer-deps
, but still could not get the node_modules. :(OS: Windows 10 Npm: 7.18.1 Node: 16.3.0
Here is my log file if it helps: