Install Ionic 2


#1

Hi All,

I am trying to install ionic@2.0.0-beta.11, however I get the following errors.

I don’t mind if I have to reinstall node, or cordova. Does anyone have any ideas of what I need to do to successfully install ionic@2.0.0-beta.11?

Thanks

npm install -g ionic@2.0.0-beta.11
C:\Users\Richard\AppData\Roaming\npm\ionic -> C:\Users\Richard\AppData\Roaming\npm\node_modules\ionic\bin\ionic

> node-sass@3.4.2 install C:\Users\Richard\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/win32-x64-48_binding.node":

HTTP error 404 Not Found

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

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


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

Building: C:\Program Files\nodejs\node.exe C:\Users\Richard\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=
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'C:\\Users\\Richard\\AppData\\Roaming\\npm\\node_modules\\ionic\\node_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.2.1
gyp info using node@6.9.2 | 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\Richard\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)
gyp verb `which` failed     at E (C:\Users\Richard\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)
gyp verb `which` failed     at C:\Users\Richard\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
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:123:15)
gyp verb `which` failed  python2 Error: not found: python2
gyp verb `which` failed     at F (C:\Users\Richard\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)
gyp verb `which` failed     at E (C:\Users\Richard\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)
gyp verb `which` failed     at C:\Users\Richard\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
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:123:15)
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 F (C:\Users\Richard\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)
gyp verb `which` failed     at E (C:\Users\Richard\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)
gyp verb `which` failed     at C:\Users\Richard\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
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:123:15)
gyp verb `which` failed  python Error: not found: python
gyp verb `which` failed     at F (C:\Users\Richard\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)
gyp verb `which` failed     at E (C:\Users\Richard\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)
gyp verb `which` failed     at C:\Users\Richard\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
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:123:15)
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 failNoPython (C:\Users\Richard\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\lib\configure.js:401:14)
gyp ERR! stack     at C:\Users\Richard\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\lib\configure.js:356:11
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Richard\\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="
gyp ERR! cwd C:\Users\Richard\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass
gyp ERR! node -v v6.9.2
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
Build failed
- cordova-lib node_modules\ionic\node_modules\ionic-app-lib\node_modules\cordova-lib
- cordova-js node_modules\ionic\node_modules\ionic-app-lib\node_modules\cordova-lib\node_modules\cordova-js
- browserify node_modules\ionic\node_modules\ionic-app-lib\node_modules\cordova-lib\node_modules\cordova-js\node_modules\browserify
- shell-quote node_modules\ionic\node_modules\ionic-app-lib\node_modules\cordova-lib\node_modules\cordova-js\node_modules\browserify\node_modules\shell-quote
C:\Users\Richard\AppData\Roaming\npm
`-- (empty)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.0.6 (node_modules\ionic\node_modules\ionic-app-lib\node_modules\webpack\node_modules\watchpack\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.6: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic@2.0.0-beta.11"
npm ERR! node v6.9.2
npm ERR! npm  v3.10.9
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! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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 information on how to open an issue for this project with:
npm ERR!     npm bugs node-sass
npm ERR! Or if that isn't available, 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!     E:\Development\IDE\ionic-apps\theWhoZoo\npm-debug.log
npm ERR! code 1

#2

Why do you want to install Beta version when rc is already available?


#3

Ì have an existing beta app. I tried upgrading to rc, but had so many issues, so am trying to revert.


#4

richardmarais, this error seems to be related with the version of node and npm.

In my case, I solved it by uninstalling node and npm and by removing node and npm folders inside my user dir and reinstalling the latest node and npm.


#5

I find I download Python and now it seems to get further. But I have an error, saying I need .NET Framework 2.0 SDK. When I download the exe from Microsoft, it does nothing.

Any ideas how to install .NET Framework 2.0 SDK?

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 14/12/2016 19:20:16.
Project "C:\Users\Richard\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\build\binding.sln" on node 1 (d
efault targets).
ValidateSolutionConfiguration:
  Building solution configuration "Release|x64".
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Mic
rosoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\Users\Richard\AppData\Roam
ing\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\build\binding.sln]
Done Building Project "C:\Users\Richard\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\build\binding.sln
" (default targets) -- FAILED.


Build FAILED.

"C:\Users\Richard\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\build\binding.sln" (default target) (1)
 ->
(_src_\libsass target) ->
  MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install M
icrosoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\Users\Richard\AppData\Ro
aming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\build\binding.sln]

    0 Warning(s)
    1 Error(s)

#6

It already happened to me before. And I found other way to solve. I still think it’s the version of node.


#7

Thanks for the advise. I uninstalled and reinstalled Node and Npm. Rebooted. Installed Cordova. Tried to install Ionic, but got errors:

npm install -g ionic@2.0.0-beta.11

...
    15 Warning(s)
    257 Error(s)

    Time Elapsed 00:01:25.62
    gyp ERR! build error
    gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
    gyp ERR! stack     at ChildProcess.onExit (C:\Users\Richard\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\lib\build.js:276:23)
    gyp ERR! stack     at emitTwo (events.js:106:13)
    gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
    gyp ERR! System Windows_NT 10.0.14393
    gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Richard\\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="
    gyp ERR! cwd C:\Users\Richard\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass
    gyp ERR! node -v v6.9.2
    gyp ERR! node-gyp -v v3.2.1
    gyp ERR! not ok
    Build failed
    [                ..] / postinstall: info lifecycle node-sass@3.4.2~postinstall: Failed to exec postinstall script

#8

It sure seems to me like a better use of your time would be fixing your app to work with current versions of the framework.


#9

I spent about a week trying to get it working with the latest version of Ionic2. Because I am using Meteor/Mongo it just gave me endless problems. I am very reluctant to try again.

Why should it be so difficult to revert Ionic?


#10

I have taken your advise. I am going to try get my old app working with the latest Ionic.


#11

Hope it works smoothly for you.


#12

Richard Marais, try Node 6.0.0:

https://nodejs.org/en/download/releases/


#13

I would definitely recommend removing your currently installed node/npm software and install the latest versions of Node/NPM instead. Doing so will often help resolve any previous installation errors with node packages.

I’d also rebuild your app from scratch using the Ionic RC 3 version and port your code across from the old app to the new app one component at a time (observing the latest Ionic documentation on syntax rules for pages, providers etc).