mslearn-staticwebapp icon indicating copy to clipboard operation
mslearn-staticwebapp copied to clipboard

Python2 should be mentioned as pre-requisite

Open rohancragg opened this issue 2 years ago • 1 comments

Trying to run vue-app after creating from template repo I am unable to run npm install without errors that suggest I need python2.exe in my PATH

I am able to resolve this by installing python 2.7 with using Scoop to install Python2 on Windows (note, I already had Python 3).

npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2

and also

npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` succeeded python C:\Users\rohan\scoop\apps\python\current\python.EXE
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: C:\Users\rohan\scoop\apps\python\current\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack   File "<string>", line 1
npm ERR! gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

and finally...

npm ERR! gyp ERR! System Windows_NT 10.0.22523
npm ERR! gyp ERR! command "C:\\Users\\rohan\\scoop\\apps\\nvs\\current\\nodejs\\node\\16.13.1\\x64\\node.exe" "C:\\Users\\rohan\\src\\github\\rohancragg\\my-static-web-app\\vue-app\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Users\rohan\src\github\rohancragg\my-static-web-app\vue-app\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.13.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1

rohancragg avatar Dec 22 '21 09:12 rohancragg

@rohancragg - Even after installing Python as you suggested, I still get the following error message from gyp:

npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************

This comes after an immense amount of logging related to downloading code / libs, extracting files from tarball node-v16.15.1, etc... I am unsure what the example is trying to accomplish, but it seems to be related to OpenSSL?

drmcclelland avatar Jul 13 '22 12:07 drmcclelland