Install Ionic behind a corporate firewall - ionic-framework

I am trying to install ionic (i need version 1) and cordova but i am behind a firewall and still could not install.
I set the proxy with npm config:
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
Try to run : npm install -g ionic
But a proxy authentication was required.
C:\Users\myuser\Desktop\myapp (master) (myapp_v01#1.0.0)
λ npm install -g ionic
npm ERR! code E407
npm ERR! 407 Proxy Authentication Required: ionic#latest
So i try : npm --proxy http://myuser:mypassword#proxy.mycompany.rs.gov.br:myportnumber install -g ionic
But still gives me an error:
npm ERR! code E407
npm ERR! 407 Proxy Authentication Required: ionic#latest
What can i do to install Ionic behind a firewall ?

After a while it worked for me :
$ npm config set proxy http://login:pass#host:port
$ npm config set https-proxy http://login:pass#host:port this worked for me.

Related

I am facing problem in running my first ionic project

I am using mac
I tried to run my first ionic project , But I am facing erroe in running it in my mac
I am putting all the steps that I have followed into Terminal -
Started with - : $ ionic start MyIonicProject tutorial
$cd MyIonicProject
$ionic serve
then I am getting error
Error: EACCES: permission denied, open '/Users/user/.ionic/helper.log'
> ionic-app-scripts serve --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
[INFO] Looks like #ionic/app-scripts isn't installed in this project.
This package is required for this command to work properly.
? Install #ionic/app-scripts? Yes
> npm i -D -E #ionic/app-scripts
npm WARN deprecated hoek#2.16.3: The major version is no longer supported. Please update to 4.x or newer
npm WARN checkPermissions Missing write access to /Users/user/Projects/MyIonicProject/node_modules
npm WARN checkPermissions Missing write access to /Users/user/Projects/MyIonicProject/node_modules/#ionic
npm ERR! path /Users/user/Projects/MyIonicProject/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/Users/user/Projects/MyIonicProject/node_modules'
npm ERR! { Error: EACCES: permission denied, access '/Users/user/Projects/MyIonicProject/node_modules'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/Users/user/Projects/MyIonicProject/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/Users/user/Projects/MyIonicProject/node_modules' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2018-09-21T06_24_56_379Z-debug.log
users-MacBook-Pro-3:MyIonicProject user$
Try running command by appending sudo as follows:
sudo ionic serve
Or
run below command in the terminal window:
sudo chown -R $USER /usr/local/
This will change the permissions of every thing inside the local folder and then try below command:
sudo ionic serve
Looks like #ionic/app-scripts isn't installed in this project.
So try first this :
npm install #ionic/app-scripts#latest --save-dev
Then:
npm install
and
ionic serve -l

Unable to install ionic -g

npm ERR! code E404
npm ERR! 404 Not Found: #ionic/cli-framework#0.1.3
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Roaming\npm-cache_logs\2018-05-10T07_52_51_175Z-debug.log
That version of Ionic doesn't exist. Try installing from the versions listed here NPM's Websites
Then npm install -g ionic#3.20.0 for the latest version of ionic
Do you already have an existing version of Ionic?
Try updating your current version or:
sudo npm uninstall -g ionic && sudo npm install ionic
Or:
npm install -g #ionic/cli-framework#3.20.0
As suggested by the other user.
my problem is solved.i uninstall nodejs and remove .npmrc file in C:\Users{user} and then,i reinstall nodejs.This errors is OK.

Serve error with ionic conference app

Trying to get ionic conference app (https://github.com/driftyco/ionic-conference-app) working.
ionic 2.1.13
npm version: 3.10.8
node version: 6.9.1
cordova version: 6.4.0
ionic serve -l results in the following output:
ionic-conference-app# ionic:serve C:\data\app\mkb
ionic-app-scripts serve "-l"
[13:21:16] ionic-app-scripts 0.0.44
[13:21:16] watch started ...
[13:21:16] build dev started ...
[13:21:16] clean started ...
[13:21:16] clean finished in less than 1 ms
[13:21:16] copy started ...
[13:21:16] transpile started ...
events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 0.0.0.0:8100
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at Server._listen2 (net.js:1257:14)
at listen (net.js:1293:10)
at net.js:1403:9
at _combinedTickCallback (internal/process/next_tick.js:77:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
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" "r
" "ionic:serve" "--" "-l"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! ionic-conference-app# ionic:serve: ionic-app-scripts serve "-l"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-conference-app# ionic:serve script 'ionic-app-
scripts serve "-l"'.
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 ionic-conference-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts serve "-l"
npm ERR! You can get information on how to open an issue for this project with:
...
There was an error serving your Ionic application: There was an error with the spawned command: serve
Any ideas as to what has gone wrong?
Many thanks
I've just tried it and it was working for me. On the package.json, it's showing that it's using the latest rc3 ("ionic-angular": "2.0.0-rc.3-201611211919") so try to do the following:
Update your ionic CLI: npm install -g ionic
Delete your node folder and do again npm install
Now, what do you get with ionic serve ?
the error you get is
listen EADDRINUSE 0.0.0.0:8100
looks like the port 8100 is in use.
try running on a different port using
--port=8101
also you can change this value in the run.js file
The error suggests to me that the port is in use already.
In my case I closed my browser instances connected to my Ionic app and also closed down my other VS Code Ionic projects and tried running the ionic serve command again and this appeared to resolve the problem.

Ionic Package unable install

I have downloaded latest node version 4 and tried to install ionic.
But it was loading for long time in command prompt.
npm install ionic -g
Then I have downloaded 0.10.38 and it started downloading.
Whether ionic supported only in the 0.10 version.
While Installing with higher version getting below error
npm ERR! Windows_NT 6.1.7600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs
node_modules\\npm\\bin\\npm-cli.js" "install" "ionic" "-g"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! Callback called more than once.
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
C:\Users\<users>\AppData\Roaming\npm
└── (empty)
npm ERR! Windows_NT 6.1.7600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs
node_modules\\npm\\bin\\npm-cli.js" "install" "ionic" "-g"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! Callback called more than once.
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
C:\Users\<users>\AppData\Roaming\npm
└── (empty)
npm ERR! Windows_NT 6.1.7600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs
node_modules\\npm\\bin\\npm-cli.js" "install" "ionic" "-g"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! Callback called more than once.
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\Windows\system32\npm-debug.log
npm ERR! code 1
The error message says "node v5.0.0". Make sure you are using Node 4 and not 5. Ionic doesn't yet work with Node 5.x.x. Use node -v to check for version.
First you need to run npm uninstall -g ionic
then install new nodejs vesrion from the https://nodejs.org/en/download/
Once you have completed your latest nodejs installation.
Try to install ionic using
npm install -g ionic
if you are using mac os or ubntu then you can use sudo npm install -g ionic.
On Windows it may be a pain to get a working environment sometimes. To speed up Ops, you can try to use the ionic-box https://github.com/driftyco/ionic-box.
Ionic-Box is a ready-to-go development environment with Ionic, Cordova, and Android.
Steps to install proper nodejs, cordova and ionic may help , try to follow mention below steps
1) Install compatible version of nodejs (windows)
2) Configured path of nodeJs from Computer property Advance environment variable.
3) check npm -v is working
4) run npm install -g cordova
5) if not started configured nodejs/npm to use http instead of https package using ssl false
6)run npm install -g ionic
You can run the following command to downgrade the version :
npm install npm#4.5.0 -g
or
npm install npm#latest -g
You can use Yeoman generator to create your ionic project, which is very easy to use.
here you can find out more :
http://yeoman.io/learning/index.html
to install yeoman :
npm install -g yo
Usage :
Make a new directory, and cd into it
mkdir my-ionic-project && cd $_
Run yo ionic, optionally passing an app name:
yo ionic [app-name]
more information :
https://github.com/diegonetto/generator-ionic
i think u should try this first node.js then commands
$ sudo npm install -g cordova after it completes then install this
$ sudo npm install -g ionic since i used sudo it may ask for password
check weather u done these steps
node.js
npm install -g cordova
npm install -g ionic
ionic --version //to check u have installed correctly
ionic start myapp blank //or tabs or sidemenu
now it will download all required files
check this link https://nodejs.org/en/
Please refer the below link, first you need to install cordova once successfully installed then install ionic.
Link - https://evothings.com/doc/build/cordova-install-windows.html
Hi I have a some problem like this one check this I hope this help you.
https://github.com/ionic-team/ionic-cli/issues/2477
Run this:
npm install --save-dev #ionic/app-scripts

Ionic install error status code 400

Welcome I want install ionic but I can't. i installed corodva.
My error status code 400(Bad Request) why?
> C:\Windows\System32>npm install -g cordova
npm WARN engine xmlbuilder#2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"4.2.2","npm":"2.14.3"})
C:\Users\kacper\AppData\Roaming\npm\cordova -> C:\Users\kacper\AppData\Roaming\npm\node_modules\cordova\bin\cordova
cordova#5.3.1 C:\Users\kacper\AppData\Roaming\npm\node_modules\cordova
├── underscore#1.7.0
├── q#1.0.1
├── nopt#3.0.1 (abbrev#1.0.7)
└── cordova-lib#5.3.1 (valid-identifier#0.0.1, unorm#1.3.3, osenv#0.1.0, properties-parser#0.2.3, bplist-parser#0.0.6, semver#4.3.6, shelljs#0.3.0, cordova-app-hello-world#3.9.0, npm#2.14.3, dep-graph#1.1.0, rc#0.5.2, xcode#0.8.0, elementtree#0.1.6, npmconf#2.1.2, glob#4.0.6, plist#1.1.0, cordova-serve#0.1.3, request#2.47.0, aliasify#1.7.2, init-package-json#1.9.1, tar#1.0.2, cordova-registry-mapper#1.1.11, cordova-js#4.1.1)
C:\Windows\System32>npm install -g ionic
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\kacper\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic"
npm ERR! node v4.2.2
npm ERR! npm v2.14.3
npm ERR! code ECONNRESET
npm ERR! network tunneling socket could not be established, statusCode=400
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! Please include the following file with any support request:
npm ERR! C:\Windows\System32\npm-debug.log
Help me.
You have to install Node JS version 0.12.6, and after that
npm install -g cordova ionic
it will install Ionic and Cordova.
firstly download and install node.js from
https://nodejs.org/en/
then restart your PC
if you are in a proxy network set your http/https proxy in CMD ( command prompt ) by
set http_proxy=http://[proxy_ip]:[proxy_port]
set https_proxy=https://[proxy_ip]:[proxy_port]
then use
npm cache clean
to clear npm's cache folder
then use the following ling to install ionic and cordovo
npm install -g cordova ionic