-1

I get the following error when I try to execute " ng new angular-realtime-polling":

gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (U:\angular-realtime-polling\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (U:\angular-realtime-polling\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (U:\angular-realtime-polling\node_modules\which\which.js:80:29)
gyp verb `which` failed     at U:\angular-realtime-polling\node_modules\which\which.js:89:16
gyp verb `which` failed     at U:\angular-realtime-polling\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at U:\angular-realtime-polling\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:153:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (U:\angular-realtime-polling\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (U:\angular-realtime-polling\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (U:\angular-realtime-polling\node_modules\which\which.js:80:29)
gyp verb `which` failed     at U:\angular-realtime-polling\node_modules\which\which.js:89:16
gyp verb `which` failed     at U:\angular-realtime-polling\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at U:\angular-realtime-polling\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:153:21)
gyp verb `which` failed   stack:
gyp verb `which` failed    'Error: not found: python2\n    at getNotFoundError (U:\\angular-realtime-polling\\node_modules\\which\\which.js:13:12)\n    at F (U:\\angular-realtime-polling\\node_modules\\which\\which.js:68:19)\n    at E (U:\\angular-realtime-polling\\node_modules\\which\\which.js:80:29)\n    at U:\\angular-realtime-polling\\node_modules\\which\\which.js:89:16\n    at U:\\angular-realtime-polling\\node_modules\\isexe\\index.js:42:5\n    at U:\\angular-realtime-polling\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:153:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (U:\angular-realtime-polling\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (U:\angular-realtime-polling\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (U:\angular-realtime-polling\node_modules\which\which.js:80:29)
gyp verb `which` failed     at U:\angular-realtime-polling\node_modules\which\which.js:89:16
gyp verb `which` failed     at U:\angular-realtime-polling\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at U:\angular-realtime-polling\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:153:21)
gyp verb `which` failed  python { Error: not found: python
gyp verb `which` failed     at getNotFoundError (U:\angular-realtime-polling\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (U:\angular-realtime-polling\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (U:\angular-realtime-polling\node_modules\which\which.js:80:29)
gyp verb `which` failed     at U:\angular-realtime-polling\node_modules\which\which.js:89:16
gyp verb `which` failed     at U:\angular-realtime-polling\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at U:\angular-realtime-polling\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:153:21)
gyp verb `which` failed   stack:
gyp verb `which` failed    'Error: not found: python\n    at getNotFoundError (U:\\angular-realtime-polling\\node_modules\\which\\which.js:13:12)\n    at F (U:\\angular-realtime-polling\\node_modules\\which\\which.js:68:19)\n    at E (U:\\angular-realtime-polling\\node_modules\\which\\which.js:80:29)\n    at U:\\angular-realtime-polling\\node_modules\\which\\which.js:89:16\n    at U:\\angular-realtime-polling\\node_modules\\isexe\\index.js:42:5\n    at U:\\angular-realtime-polling\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:153:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (U:\angular-realtime-polling\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (U:\angular-realtime-polling\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack     at U:\angular-realtime-polling\node_modules\graceful-fs\polyfills.js:282:31
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:153:21)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "U:\\angular-realtime-polling\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd U:\angular-realtime-polling\node_modules\node-sass
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN rollback Rolling back readable-stream@2.3.6 failed (this is probably harmless): EPERM: operation not permitted, lstat 'U:\angular-realtime-polling\node_modules\fsevents\node_modules'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.11.0 (node_modules\node-sass):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.11.0 postinstall: `node scripts/build.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

added 1013 packages from 1014 contributors and audited 42608 packages in 1412.486s found 0 vulnerabilities Der Befehl "git" ist entweder falsch geschrieben oder konnte nicht gefunden werden.

Does someone know why I get this error and how I can fix it ? Because I have no clue. Thank you very much !

1 Answers1

1

You need to install python and set environment variable as mentioned in error to solve this issue.

This question answers how to set environment variable for windows.

Visit this link to get version of python you need. In windows python installer will ask you to automatically add the environment variable.

Thanthu
  • 4,399
  • 34
  • 43
  • I did install python...i think....how can I look up if I have installed it? –  Mar 26 '19 at 11:14
  • open command prompt and enter 'python'. If you are sure you installed it may be you haven't set the environment variable – Thanthu Mar 26 '19 at 11:15
  • Refer the link to the stackoverflow question in the answer on how to set environment variable. After installing python – Thanthu Mar 26 '19 at 11:18
  • you can just google install python, I've provided the link in answer anyways – Thanthu Mar 26 '19 at 11:31