首页 > ionic 安装问题

ionic 安装问题

cordova已经安装好了,安装ionic时一直安装不成功,之前发现是没有安装python,然后python也安装了,还是不行

C:\Users\master>npm install -g ionic
/


> spawn-sync@1.0.14 postinstall C:\Users\master\AppData\Roaming\npm\node_modules
\ionic\node_modules\ionic-app-lib\node_modules\cross-spawn\node_modules\spawn-sy
nc
> node postinstall

-


> node-sass@3.4.2 install C:\Users\master\AppData\Roaming\npm\node_modules\ionic
\node_modules\ionic-app-lib\node_modules\node-sass
> node scripts/install.js

Cannot download "https://github.com/sass/node-sass/releases/download/v3.4.2/win3
2-x64-14_binding.node":

socket hang up

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
npm WARN engine cordova-js@4.0.0: wanted: {"node":"~0.10.x"} (current: {"node":"
0.12.7","npm":"2.11.3"})
/


> node-sass@3.4.2 postinstall C:\Users\master\AppData\Roaming\npm\node_modules\i
onic\node_modules\ionic-app-lib\node_modules\node-sass
> node scripts/build.js

Building: C:\Program Files\nodejs\node.exe C:\Users\master\AppData\Roaming\npm\n
ode_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= --l
ibsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'C:\\Users\\master\\AppData\\Roaming\\npm\\node_modules\\ionic\\n
ode_modules\\ionic-app-lib\\node_modules\\node-sass\\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.1.0
gyp info using node@0.12.7 | 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 F (C:\Users\master\AppData\Roaming\npm\node_modul
es\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp
\node_modules\which\which.js:78:19)
 `which` failed     at E (C:\Users\master\AppData\Roaming\npm\node_modules\ionic
\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\node_mo
dules\which\which.js:82:29)
gyp verb `which` failed     at C:\Users\master\AppData\Roaming\npm\node_modules\
ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\no
de_modules\which\which.js:93:16
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:95:15)
gyp verb `which` failed  python2 [Error: not found: python2]
verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at F (C:\Users\master\AppData\Roaming\npm\node_modul
es\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp
\node_modules\which\which.js:78:19)
gyp verb `which` failed     at E (C:\Users\master\AppData\Roaming\npm\node_modul
es\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp
\node_modules\which\which.js:82:29)
gyp verb `which` failed     at C:\Users\master\AppData\Roaming\npm\node_modules\
ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\no
de_modules\which\which.js:93:16
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:95:15)
gyp verb `which` failed  python [Error: not found: python]
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp verb check python version `C:\Python27\python.exe -c "import platform; print
(platform.python_version());"` returned: "2.7.9\r\n"
gyp verb get node dir no --target version specified, falling back to host node v
ersion: 0.12.7
gyp verb command install [ '0.12.7' ]
gyp verb install input version string "0.12.7"
install installing version: 0.12.7
gyp verb install --ensure was passed, so won't reinstall if already installed
verb install version not already installed, continuing with install 0.12.7
gyp verb ensuring nodedir is created C:\Users\master\.node-gyp\0.12.7
gyp verb created nodedir C:\Users\master\.node-gyp
gyp http GET https://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz
gyp WARN install got an error, rolling back install
gyp verb command remove [ '0.12.7' ]
gyp verb remove using node-gyp dir: C:\Users\master\.node-gyp
gyp verb remove removing target version: 0.12.7
gyp verb remove removing development files for version: 0.12.7
gyp ERR! configure error
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack     at exports._errnoException (util.js:746:11)
gyp ERR! stack     at TCP.onread (net.js:559:26)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\master\\AppDa
ta\\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="
gyp ERR! cwd C:\Users\master\AppData\Roaming\npm\node_modules\ionic\node_modules
\ionic-app-lib\node_modules\node-sass
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v3.1.0
gyp ERR! not ok
Build failed
npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {
"node":"0.12.7","npm":"2.11.3"})
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code ELIFECYCLE

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

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\master\npm-debug.log

@master 请问你的问题是怎么解决的啊?Turbo的方案解决你的问题了吗?
http://bbs.phonegap100.com/thread-2622-1-1.html
我直接用第4种方法之后,然后再安装就OK了,不过不明白为什么要这样安装-_-||


我没有用它的方法,我直接挂VPN装,就成功了


http://www.zhihu.com/question/31695126 你试试

【热门文章】
【热门文章】