PhoneGap中文网

 找回密码
 立即注册
查看: 18610|回复: 6
打印 上一主题 下一主题

npm install - ionic 安装失败

[复制链接]

1

主题

6

帖子

25

积分

新手上路

Rank: 1

积分
25
跳转到指定楼层
楼主
发表于 2015-11-7 14:58:11 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
  1. C:\Users\admin>npm install -g ionic

  2. > spawn-sync@1.0.14 postinstall C:\Users\admin\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\cross-spawn\node_modules\spawn-sync
  3. > node postinstall


  4. > node-sass@3.4.1 install C:\Users\admin\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass
  5. > node scripts/install.js

  6. Cannot download "https://github.com/sass/node-sass/releases/download/v3.4.1/win32-x64-46_binding.node":

  7. read ECONNRESET

  8. Hint: If github.com is not accessible in your location
  9.       try setting a proxy via HTTP_PROXY, e.g.

  10.       export HTTP_PROXY=http://example.com:1234

  11. or configure npm proxy via

  12.       npm config set proxy http://example.com:8080
  13. npm WARN engine cordova-js@4.0.0: wanted: {"node":"~0.10.x"} (current: {"node":"4.2.2","npm":"2.14.7"})
  14. npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"4.2.2","npm":"2.14.7"})

  15. > node-sass@3.4.1 postinstall C:\Users\admin\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass
  16. > node scripts/build.js

  17. ` C:\Users\admin\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\vendor\win32-x64-46\binding.node ` exists.
  18. testing binary.
  19. Problem with the binary.
  20. Manual build incoming.
  21. Building: C:\Program Files\nodejs\node.exe C:\Users\admin\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
  22. gyp info it worked if it ends with ok
  23. gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
  24. gyp verb cli   'C:\\Users\\admin\\AppData\\Roaming\\npm\\node_modules\\ionic\\node_modules\\ionic-app-lib\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js',
  25. gyp verb cli   'rebuild',
  26. gyp verb cli   '--verbose',
  27. gyp verb cli   '--libsass_ext=',
  28. gyp verb cli   '--libsass_cflags=',
  29. gyp verb cli   '--libsass_ldflags=',
  30. gyp verb cli   '--libsass_library=' ]
  31. gyp info using node-gyp@3.0.3
  32. gyp info using node@4.2.2 | win32 | x64
  33. gyp verb command rebuild []
  34. gyp verb command clean []
  35. gyp verb clean removing "build" directory
  36. gyp verb command configure []
  37. gyp verb check python checking for Python executable "python2" in the PATH
  38. gyp verb `which` failed Error: not found: python2
  39. gyp verb `which` failed     at F (C:\Users\admin\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\node_modules\which\which.js:78:19)
  40. gyp verb `which` failed     at E (C:\Users\admin\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\node_modules\which\which.js:82:29)
  41. gyp verb `which` failed     at C:\Users\admin\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\node_modules\which\which.js:93:16
  42. gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:82:15)
  43. gyp verb `which` failed  python2 [Error: not found: python2]
  44. gyp verb check python checking for Python executable "python" in the PATH
  45. gyp verb `which` failed Error: not found: python
  46. gyp verb `which` failed     at F (C:\Users\admin\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\node_modules\which\which.js:78:19)
  47. gyp verb `which` failed     at E (C:\Users\admin\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\node_modules\which\which.js:82:29)
  48. gyp verb `which` failed     at C:\Users\admin\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\node_modules\which\which.js:93:16
  49. gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:82:15)
  50. gyp verb `which` failed  python [Error: not found: python]
  51. gyp verb could not find "python". guessing location
  52. gyp verb ensuring that file exists: C:\Python27\python.exe
  53. gyp ERR! configure error
  54. gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
  55. gyp ERR! stack     at failNoPython (C:\Users\admin\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\lib\configure.js:116:14)
  56. gyp ERR! stack     at C:\Users\admin\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\lib\configure.js:71:11
  57. gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:82:15)
  58. gyp ERR! System Windows_NT 10.0.10586
  59. gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\admin\\AppData\\Roaming\\npm\\node_modules\\ionic\\node_modules\\ionic-app-lib\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
  60. gyp ERR! cwd C:\Users\admin\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass
  61. gyp ERR! node -v v4.2.2
  62. gyp ERR! node-gyp -v v3.0.3
  63. gyp ERR! not ok
  64. Build failed
  65. npm ERR! Windows_NT 10.0.10586
  66. npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic"
  67. npm ERR! node v4.2.2
  68. npm ERR! npm  v2.14.7
  69. npm ERR! code ELIFECYCLE

  70. npm ERR! node-sass@3.4.1 postinstall: `node scripts/build.js`
  71. npm ERR! Exit status 1
  72. npm ERR!
  73. npm ERR! Failed at the node-sass@3.4.1 postinstall script 'node scripts/build.js'.
  74. npm ERR! This is most likely a problem with the node-sass package,
  75. npm ERR! not with npm itself.
  76. npm ERR! Tell the author that this fails on your system:
  77. npm ERR!     node scripts/build.js
  78. npm ERR! You can get their info via:
  79. npm ERR!     npm owner ls node-sass
  80. npm ERR! There is likely additional logging output above.

  81. npm ERR! Please include the following file with any support request:
  82. npm ERR!     C:\Users\admin\npm-debug.log
复制代码
已经尝试了很多了,都是这样的错误。其他都已经成功安装-cordova,java等

回复

使用道具 举报

493

主题

2035

帖子

6894

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
6894
沙发
发表于 2015-11-8 10:49:39 | 只看该作者
网络问题,翻墙试试

回复 支持 反对

使用道具 举报

3

主题

9

帖子

43

积分

新手上路

Rank: 1

积分
43
板凳
发表于 2015-11-23 11:47:23 | 只看该作者
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.

应该是没有装python,装一个python2,前几天我也是这个问题
这几天变network问题啦
回复 支持 反对

使用道具 举报

9

主题

36

帖子

185

积分

注册会员

Rank: 2

积分
185
地板
发表于 2016-2-23 10:19:52 | 只看该作者
  1. Cannot download "https://github.com/sass/node-sass/releases/download/v3.4.2/win32-x64-47_binding.node":
  2. read ECONNRESET
  3. Hint: If github.com is not accessible in your location  try setting a proxy via HTTP_PROXY, e.g.
  4.       export HTTP_PROXY=http://example.com:1234 or configure npm proxy via
  5.       npm config set proxy http://example.com:8080
  6. ......
  7. Problem with the binary.
  8. Manual build incoming.
  9. ......
  10. gyp verb check python checking for Python executable "python2" in the PATH
  11. gyp verb `which` failed Error: not found: python2
  12. gyp verb `which` failed     at F (C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\which\which.js:63:19)
  13. gyp verb `which` failed     at E (C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\which\which.js:72:29)
  14. gyp verb `which` failed     at C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\which\which.js:81:16
  15. gyp verb `which` failed     at C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\isexe\index.js:44:5
  16. gyp verb `which` failed     at C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\isexe\windows.js:29:5
  17. gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:82:15)
  18. gyp verb `which` failed  python2 [Error: not found: python2]
  19. gyp verb check python checking for Python executable "python" in the PATH
  20. gyp verb `which` succeeded python D:\Program\Python2\python.EXE
  21. gyp verb check python version `D:\Program\Python2\python.EXE -c "import platform; print(platform.python_version());"` returned: "2.7.11\r\n"
  22. ........
  23. gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
  24. 在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
  25. 生成启动时间为 2016/2/23 10:06:18。
  26. 节点 1 上的项目“C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.sln”(默认目标)。
  27. ValidateSolutionConfiguration:
  28.   正在生成解决方案配置“Release|x64”。
  29. 项目中不存在 BeforeTargets 特性中的“C:\Program Files (x86)\MSBuild\Microsoft\NuGet\Microsoft.NuGet.targets (186,61)”位置列出的目标“BeforeGenerateProjectPriFile”,将忽略该目标。
  30. 项目“C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.sln”(1)正在节点 1 上生成“C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.vcxproj.metaproj”(2) (默认目标)。
  31. 项目“C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.vcxproj.metaproj”(2)正在节点 1 上生成“C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\src\libsass.vcxproj”(3) (默认目标)。
  32. PrepareForBuild:
  33.   正在创建目录“Release\obj\libsass\”。
  34. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry.  TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [C:\Users\Administrator\App
  35.   正在创建目录“C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\Release\”。
  36.   正在创建目录“Release\obj\libsass\libsass.tlog\”。
  37. InitializeBuildStatus:
  38.   正在创建“Release\obj\libsass\libsass.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。
  39. ClCompile:
  40.   CL.exe /c /I"C:\Users\Administrator\.node-gyp\5.6.0\include\node" /I"C:\Users\Administrator\.node-gyp\5.6.0\src" /I"C:\Users\Administrator\.node-gyp\5.6.0\deps\uv\include" /I"C:\Users\Administrator\.node-gyp\5.6.0\deps\v8\include" /I..\..\src\libsass\include /Zi /nologo /W
  41.   ass\\" /Fd"Release\obj\libsass\libsass.pdb" /Gd /TP /wd4351 /wd4355 /wd4800 /wd4251 /errorReport:queue /GR /EHsc /MP ..\..\src\libsass\src\ast.cpp ..\..\src\libsass\src\base64vlq.cpp ..\..\src\libsass\src\bind.cpp ..\..\src\libsass\src\color_maps.cpp ..\..\src\libsass\src\
  42.   \..\src\libsass\src\functions.cpp ..\..\src\libsass\src\inspect.cpp ..\..\src\libsass\src\json.cpp ..\..\src\libsass\src\lexer.cpp ..\..\src\libsass\src\listize.cpp ..\..\src\libsass\src\memory_manager.cpp ..\..\src\libsass\src\node.cpp ..\..\src\libsass\src\output.cpp ..\
  43.   pp ..\..\src\libsass\src\sass_interface.cpp ..\..\src\libsass\src\sass_util.cpp ..\..\src\libsass\src\sass_values.cpp ..\..\src\libsass\src\source_map.cpp ..\..\src\libsass\src\to_c.cpp ..\..\src\libsass\src\to_string.cpp ..\..\src\libsass\src\to_value.cpp ..\..\src\libsas
  44.   TRACKER : 错误 TRK0005: 未能找到: “CL.exe”。系统找不到指定的文件。
  45. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: “CL.exe”已退出,代码为 5。 [C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\src\libsass.vcxproj]
  46. 已完成生成项目“C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\src\libsass.vcxproj”(默认目标)的操作 - 失败。
  47. 已完成生成项目“C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.vcxproj.metaproj”(默认目标)的操作 - 失败。
  48. 已完成生成项目“C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.sln”(默认目标)的操作 - 失败。
  49. 生成失败。
  50. “C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.sln”(默认目标) (1) ->
  51. “C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.vcxproj.metaproj”(默认目标) (2) ->
  52. “C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\src\libsass.vcxproj”(默认目标) (3) ->
  53. (PrepareForBuild 目标) ->
  54.   C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry.  TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [C:\Users\Administrator\A
  55. “C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.sln”(默认目标) (1) ->
  56. “C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.vcxproj.metaproj”(默认目标) (2) ->
  57. “C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\src\libsass.vcxproj”(默认目标) (3) ->
  58. (ClCompile 目标) ->
  59.   C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: “CL.exe”已退出,代码为 5。 [C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\src\libsass.vcxproj]
  60.     1 个警告
  61.     1 个错误
  62. 已用时间 00:00:01.03
  63. gyp ERR! build error
  64. gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
  65. gyp ERR! stack     at ChildProcess.onExit (C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-gyp\lib\build.js:276:23)
  66. gyp ERR! stack     at emitTwo (events.js:100:13)
  67. gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
  68. gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
  69. gyp ERR! System Windows_NT 6.1.7601
  70. gyp ERR! command "D:\\Program\\nodejs\\node.exe" "C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\ionic\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
  71. gyp ERR! cwd C:\Users\Administrator\AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass
  72. gyp ERR! node -v v5.6.0
  73. gyp ERR! node-gyp -v v3.2.1
  74. gyp ERR! not ok
  75. Build failed
  76. C:\Users\Administrator\AppData\Roaming\npm
  77. `-- (empty)
  78. npm ERR! Windows_NT 6.1.7601
  79. npm ERR! argv "D:\\Program\\nodejs\\node.exe" "D:\\Program\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic"
  80. npm ERR! node v5.6.0
  81. npm ERR! npm  v3.6.0
  82. npm ERR! code ELIFECYCLE
  83. npm ERR! node-sass@3.4.2 postinstall: `node scripts/build.js`
  84. npm ERR! Exit status 1
  85. npm ERR!
  86. npm ERR! Failed at the node-sass@3.4.2 postinstall script 'node scripts/build.js'.
  87. npm ERR! Make sure you have the latest version of node.js and npm installed.
  88. npm ERR! If you do, this is most likely a problem with the node-sass package,
  89. npm ERR! not with npm itself.
  90. npm ERR! Tell the author that this fails on your system:
  91. npm ERR!     node scripts/build.js
  92. npm ERR! You can get information on how to open an issue for this project with:
  93. npm ERR!     npm bugs node-sass
  94. npm ERR! Or if that isn't available, you can get their info via:
  95. npm ERR!     npm owner ls node-sass
  96. npm ERR! There is likely additional logging output above.
  97. npm ERR! Please include the following file with any support request:
  98. npm ERR!     C:\Users\Administrator\npm-debug.log
  99. npm ERR! code 1
复制代码
安装了一下python2,并且配置了环境变量,结果出现上面的问题:

回复 支持 反对

使用道具 举报

11

主题

529

帖子

1418

积分

金牌会员

Rank: 6Rank: 6

积分
1418
5#
发表于 2016-2-23 10:24:12 | 只看该作者
amy 发表于 2016-2-23 10:19
安装了一下python2,并且配置了环境变量,结果出现上面的问题:

http://bbs.phonegap100.com/thread-2622-1-1.html

这个帖子看看
回复 支持 反对

使用道具 举报

9

主题

36

帖子

185

积分

注册会员

Rank: 2

积分
185
6#
发表于 2016-2-23 10:55:02 | 只看该作者
ionic安装失败或者cordova安装失败解决方法:
http://bbs.phonegap100.com/thread-2622-1-1.html
回复 支持 反对

使用道具 举报

9

主题

36

帖子

185

积分

注册会员

Rank: 2

积分
185
7#
发表于 2016-2-23 10:55:28 | 只看该作者
在此谢谢各位大神
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

ionic4视频教程

Archiver|手机版|小黑屋| PhoneGap中文网 ( 京ICP备13027796号-1 )  

GMT+8, 2024-12-23 01:53 , Processed in 0.093097 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表