| 
 | 
 
已安装nodejs、node-sass、Angular cli 相关淘宝镜像也下载了,ng new my-app这个命令创建项目时出现异常 命令执行后信息如下  ,请问怎么处理? 
 
 
E:\workspace\space1000>ng new demo01 
  create demo01/e2e/app.e2e-spec.ts (288 bytes) 
  create demo01/e2e/app.po.ts (208 bytes) 
  create demo01/e2e/tsconfig.e2e.json (235 bytes) 
  create demo01/karma.conf.js (923 bytes) 
  create demo01/package.json (1291 bytes) 
  create demo01/protractor.conf.js (722 bytes) 
  create demo01/README.md (1022 bytes) 
  create demo01/tsconfig.json (363 bytes) 
  create demo01/tslint.json (3012 bytes) 
  create demo01/.angular-cli.json (1241 bytes) 
  create demo01/.editorconfig (245 bytes) 
  create demo01/.gitignore (544 bytes) 
  create demo01/src/assets/.gitkeep (0 bytes) 
  create demo01/src/environments/environment.prod.ts (51 bytes) 
  create demo01/src/environments/environment.ts (387 bytes) 
  create demo01/src/favicon.ico (5430 bytes) 
  create demo01/src/index.html (293 bytes) 
  create demo01/src/main.ts (370 bytes) 
  create demo01/src/polyfills.ts (3114 bytes) 
  create demo01/src/styles.css (80 bytes) 
  create demo01/src/test.ts (642 bytes) 
  create demo01/src/tsconfig.app.json (211 bytes) 
  create demo01/src/tsconfig.spec.json (283 bytes) 
  create demo01/src/typings.d.ts (104 bytes) 
  create demo01/src/app/app.module.ts (316 bytes) 
  create demo01/src/app/app.component.html (1141 bytes) 
  create demo01/src/app/app.component.spec.ts (986 bytes) 
  create demo01/src/app/app.component.ts (207 bytes) 
  create demo01/src/app/app.component.css (0 bytes) 
npm WARN deprecated nodemailer@2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/ 
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead 
npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0 
npm WARN deprecated socks@1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0 
npm WARN deprecated mailcomposer@4.0.1: This project is unmaintained 
npm WARN deprecated buildmail@4.0.1: This project is unmaintained 
npm WARN prefer global node-gyp@3.6.2 should be installed with -g 
 
> uws@9.14.0 install E:\workspace\space1000\demo01\node_modules\uws 
> node-gyp rebuild > build_log.txt 2>&1 || exit 0 
 
 
> node-sass@4.8.3 install E:\workspace\space1000\demo01\node_modules\node-sass 
> node scripts/install.js 
 
Downloading binary from https://github.com/sass/node-sas ... x64-51_binding.node 
Cannot download "https://github.com/sass/node-sass/releases/download/v4.8.3/win32-x64-51_binding.node": 
 
ESOCKETTIMEDOUT 
 
Hint: If github.com is not accessible in your location 
      try setting a proxy via HTTP_PROXY, e.g. 
 
      export HTTP_PROXY=http://example.com:1234 
 
or configure npm proxy via 
 
      npm config set proxy http://example.com:8080 
 
> uglifyjs-webpack-plugin@0.4.6 postinstall E:\workspace\space1000\demo01\node_modules\webpack\node_modules\uglifyjs-webpack-plugin 
> node lib/post_install.js 
 
 
> node-sass@4.8.3 postinstall E:\workspace\space1000\demo01\node_modules\node-sass 
> node scripts/build.js 
 
Building: D:\app\nodejs\node.exe E:\workspace\space1000\demo01\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= 
gyp info it worked if it ends with ok 
gyp verb cli [ 'D:\\app\\nodejs\\node.exe', 
gyp verb cli   'E:\\workspace\\space1000\\demo01\\node_modules\\node-gyp\\bin\\node-gyp.js', 
gyp verb cli   'rebuild', 
gyp verb cli   '--verbose', 
gyp verb cli   '--libsass_ext=', 
gyp verb cli   '--libsass_cflags=', 
gyp verb cli   '--libsass_ldflags=', 
gyp verb cli   '--libsass_library=' ] 
gyp info using node-gyp@3.6.2 
gyp info using node@7.7.1 | win32 | x64 
gyp verb command rebuild [] 
gyp verb command clean [] 
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 (E:\workspace\space1000\demo01\node_modules\which\which.js:13:12) 
gyp verb `which` failed     at F (E:\workspace\space1000\demo01\node_modules\which\which.js:68:19) 
gyp verb `which` failed     at E (E:\workspace\space1000\demo01\node_modules\which\which.js:80:29) 
gyp verb `which` failed     at E:\workspace\space1000\demo01\node_modules\which\which.js:89:16 
gyp verb `which` failed     at E:\workspace\space1000\demo01\node_modules\isexe\index.js:42:5 
gyp verb `which` failed     at E:\workspace\space1000\demo01\node_modules\isexe\windows.js:36:5 
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:114:15) 
gyp verb `which` failed  python2 { Error: not found: python2 
gyp verb `which` failed     at getNotFoundError (E:\workspace\space1000\demo01\node_modules\which\which.js:13:12) 
gyp verb `which` failed     at F (E:\workspace\space1000\demo01\node_modules\which\which.js:68:19) 
gyp verb `which` failed     at E (E:\workspace\space1000\demo01\node_modules\which\which.js:80:29) 
gyp verb `which` failed     at E:\workspace\space1000\demo01\node_modules\which\which.js:89:16 
gyp verb `which` failed     at E:\workspace\space1000\demo01\node_modules\isexe\index.js:42:5 
gyp verb `which` failed     at E:\workspace\space1000\demo01\node_modules\isexe\windows.js:36:5 
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:114:15) 
gyp verb `which` failed   stack: 'Error: not found: python2\n    at getNotFoundError (E:\\workspace\\space1000\\demo01\\node_modules\\which\\which.js:13:12)\n    at F (E:\\workspace\\space1000\\demo 
\\node_modules\\which\\which.js:68:19)\n    at E (E:\\workspace\\space1000\\demo01\\node_modules\\which\\which.js:80:29)\n    at E:\\workspace\\space1000\\demo01\\node_modules\\which\\which.js:89:16 
    at E:\\workspace\\space1000\\demo01\\node_modules\\isexe\\index.js:42:5\n    at E:\\workspace\\space1000\\demo01\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:114:15) 
 
gyp verb `which` failed   code: 'ENOENT' } 
gyp verb check python checking for Python executable "python" in the PATH 
gyp verb `which` succeeded python D:\devtools\Python\python.EXE 
gyp verb check python version `D:\devtools\Python\python.EXE -c "import platform; print(platform.python_version());"` returned: "3.6.4\r\n" 
gyp verb could not find "D:\devtools\Python\python.EXE". checking python launcher 
gyp verb could not find "D:\devtools\Python\python.EXE". 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 "D:\devtools\Python\python.EXE", you can set the PYTHON env variable. 
gyp ERR! stack     at PythonFinder.failNoPython (E:\workspace\space1000\demo01\node_modules\node-gyp\lib\configure.js:483:19) 
gyp ERR! stack     at PythonFinder.<anonymous> (E:\workspace\space1000\demo01\node_modules\node-gyp\lib\configure.js:508:16) 
gyp ERR! stack     at E:\workspace\space1000\demo01\node_modules\graceful-fs\polyfills.js:284:29 
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:114:15) 
gyp ERR! System Windows_NT 6.1.7601 
gyp ERR! command "D:\\app\\nodejs\\node.exe" "E:\\workspace\\space1000\\demo01\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflag 
" "--libsass_library=" 
gyp ERR! cwd E:\workspace\space1000\demo01\node_modules\node-sass 
gyp ERR! node -v v7.7.1 
gyp ERR! node-gyp -v v3.6.2 
gyp ERR! not ok 
Build failed with error code: 1 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents): 
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.2 (node_modules\watchpack\node_modules\chokidar\node_modules\fsevents): 
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.2 (node_modules\webpack-dev-server\node_modules\chokidar\node_modules\fsevents): 
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.8.3 (node_modules\node-sass): 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.8.3 postinstall: `node scripts/build.js` 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 
npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "D:\\app\\nodejs\\node.exe" "D:\\app\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--quiet" 
npm ERR! node v7.7.1 
npm ERR! npm  v4.1.2 
npm ERR! path E:\workspace\space1000\demo01\node_modules\yargs-parser\node_modules 
npm ERR! code EPERM 
npm ERR! errno -4048 
npm ERR! syscall scandir 
 
npm ERR! Error: EPERM: operation not permitted, scandir 'E:\workspace\space1000\demo01\node_modules\yargs-parser\node_modules' 
npm ERR!  { Error: EPERM: operation not permitted, scandir 'E:\workspace\space1000\demo01\node_modules\yargs-parser\node_modules' 
npm ERR!   errno: -4048, 
npm ERR!   code: 'EPERM', 
npm ERR!   syscall: 'scandir', 
npm ERR!   path: 'E:\\workspace\\space1000\\demo01\\node_modules\\yargs-parser\\node_modules' } 
npm ERR! 
npm ERR! Please try running this command again as root/Administrator. 
 
npm ERR! Please include the following file with any support request: 
npm ERR!     E:\workspace\space1000\demo01\npm-debug.log 
Error: Package install failed, see above. 
Package install failed, see above. 
 
 
 
 |   
 
 
 
 |