Ionic installation error!! Ubuntu - ionic-framework

I cannot install Ionic , i have installed cordova 6.4.0 , my npm 4.0.2, node v6.9.1
I had Ionic installed previously , i uninstalled and now unable to install it again using npm install -g ionic I get this dependency error as follows:
ionic2#2.0.0-rc.1
├── UNMET PEER DEPENDENCY #angular/common#2.0.0
├── UNMET PEER DEPENDENCY #angular/compiler#2.0.0
├── UNMET PEER DEPENDENCY #angular/core#2.0.0
├── UNMET PEER DEPENDENCY #angular/platform-browser#2.0.0
└── UNMET PEER DEPENDENCY typescript#^2.0.2
npm WARN #angular/platform-browser-dynamic#2.1.0 requires a peer of #angular/core#2.1.0 but none was installed.
npm WARN #angular/platform-browser-dynamic#2.1.0 requires a peer of #angular/common#2.1.0 but none was installed.
npm WARN #angular/platform-browser-dynamic#2.1.0 requires a peer of #angular/compiler#2.1.0 but none was installed.
npm WARN #angular/platform-browser-dynamic#2.1.0 requires a peer of #angular/platform-browser#2.1.0 but none was installed.
npm WARN #angular/compiler-cli#0.6.2 requires a peer of typescript#^2.0.2 but none was installed.
npm WARN #angular/tsc-wrapped#0.3.0 requires a peer of typescript#^2.0.2 but none was installed.
npm WARN tsickle#0.1.7 requires a peer of typescript#^2.0.0 || ^2.1.0-dev but none was installed.
Please someone help!!!!

Hi try installing nvm from here.
Then run this command:
nvm install 5.11.0
Wait for the node 5.11.0 installation and then:
nvm use 5.11.0
Now, while you are using node 5.11.0 run:
npm i -g ionic cordova
This is my setup and im able to work with ionic2 RC3.

Related

Running npm install with post install script installing a subdirectory app on github-actions inside docker container fails

I'm getting this error when I try to run npm install in github actions. I have a subfolder which has another project and on postinstall I run the npm install for that subfolder.
Here is the worflow.yml file
name: Install and cache dependencies
on:
workflow_call:
jobs:
install-and-cache-dependencies:
runs-on: ubuntu-latest
# Builder image it contains nodeJs + chromium to run the tests on the ui using puppeteer. We had to build our own because there is no official
# image for this. Version 16.13.0 is the nodeJs version which is installed inside the package.
container:
image: houzy/frontend-builder:16.13.1
env:
NODE_OPTIONS: "--max_old_space_size=4096"
steps:
- uses: actions/checkout#v3
- name: Create hash key
run: touch ${{ hashFiles('**/package-lock.json') }}.hash-file
- name: Install dependencies
run: npm install # npm run install:widgets is run as a post install script
- name: Ivy post-install processing
# This script goes through libraries and adjust them so that they work properly with the Ivy. It stores
# results in node_modules, so it will change whenever some dependencies change.
run: npm run postinstall-ivy
Here is the complete error from Install dependencies step
npm WARN using --force Recommended protections disabled.
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated w3c-hr-time#1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated stable#0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated postinstall-build#5.0.3: postinstall-build's behavior is now built into npm! You should migrate off of postinstall-build and use the new `prepare` lifecycle script with npm 5.0.0 or greater.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated circular-json#0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated #types/swiper#6.0.0: This is a stub types definition. swiper provides its own type definitions, so you do not need this installed.
npm WARN deprecated #types/express-winston#4.0.0: This is a stub types definition. express-winston provides its own type definitions, so you do not need this installed.
npm WARN deprecated sane#4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated #wessberg/ts-evaluator#0.0.27: this package has been renamed to ts-evaluator. Please install ts-evaluator instead
> angular-frontend#1.0.0 postinstall
> cd widgets && npm install
npm WARN using --force Recommended protections disabled.
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /__w/angular-frontend/angular-frontend/widgets/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/__w/angular-frontend/angular-frontend/widgets/node_modules'
npm ERR! [Error: EACCES: permission denied, mkdir '/__w/angular-frontend/angular-frontend/widgets/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/__w/angular-frontend/angular-frontend/widgets/node_modules'
npm ERR! }
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.
npm ERR! A complete log of this run can be found in:
npm ERR! /github/home/.npm/_logs/2023-01-12T10_19_14_334Z-debug.log
npm ERR! code 243
npm ERR! path /__w/angular-frontend/angular-frontend
npm ERR! command failed
npm ERR! command sh -c cd widgets && npm install
npm ERR! A complete log of this run can be found in:
npm ERR! /github/home/.npm/_logs/2023-01-12T10_19_14_398Z-debug.log
Error: Process completed with exit code 243.
Install Dependencies step runs npm install and in my package.json I have a postinstall script
{
"scripts": {
"postinstall": "cd widgets && npm install"
}
}
Seems the permissions error comes from the container image houzy/frontend-builder:16.13.1, cause removing the container part from workflow makes the pipeline work. I would like to understand what I should set in the container part from the worflow or in the Dockerfile for creating this image to make it work.
Here is the Dockerfile to create the image:
# Dockerfile used for replacing bitbucket pipeline start image
FROM node:16.13.0
RUN apt-get update; apt-get install -y gettext-base;
RUN echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/chrome.list
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN set -x && apt-get update && apt-get install -y xvfb google-chrome-stable
RUN wget -q -O /usr/bin/xvfb-chrome https://bitbucket.org/atlassian/docker-node-chrome-firefox/raw/ff180e2f16ea8639d4ca4a3abb0017ee23c2836c/scripts/xvfb-chrome
RUN ln -sf /usr/bin/xvfb-chrome /usr/bin/google-chrome
RUN chmod 755 /usr/bin/google-chrome
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && unzip awscliv2.zip && ./aws/install
RUN curl -O https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py --user && ~/.local/bin/pip install --upgrade awsebcli
As a side note I use the same image in bitbucket-pipelines and there it works so maybe just the start container command is different on github-actions ?

ionic upgrade from 4 to 6 issues

i have those warns... how can handle? when try i get others all the time
npm WARN deprecated #types/googlemaps#3.39.13: Types for the Google Maps browser API have moved to #types/google.maps. Note: these types are not for the googlemaps npm package, which is a Node API.
npm WARN #agm/core#3.0.0-beta.0 requires a peer of #angular/common#^9.1.0 || ^10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #agm/core#3.0.0-beta.0 requires a peer of #angular/core#^9.1.0 || ^10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #angular-devkit/build-angular#14.0.5 requires a peer of #angular/compiler-cli#^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ngtools/webpack#14.0.5 requires a peer of #angular/compiler-cli#^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/core#14.1.0 requires a peer of zone.js#~0.11.4 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/fire#7.4.1 requires a peer of #angular/common#^12.0.0 || ^13.0.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/fire#7.4.1 requires a peer of #angular/platform-browser#^12.0.0 || ^13.0.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/fire#7.4.1 requires a peer of #angular/platform-browser-dynamic#^12.0.0 || ^13.0.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/forms#14.1.0 requires a peer of #angular/common#14.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/forms#14.1.0 requires a peer of #angular/platform-browser#14.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/router#14.1.0 requires a peer of #angular/common#14.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/router#14.1.0 requires a peer of #angular/platform-browser#14.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/service-worker#14.1.0 requires a peer of #angular/common#14.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN #auth0/angular-jwt#5.0.2 requires a peer of #angular/common#>=9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ionic/angular#6.1.15 requires a peer of zone.js#>=0.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ionic/eslint-config#0.3.0 requires a peer of eslint#>=7 but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/eslint-plugin#4.33.0 requires a peer of eslint#^5.0.0 || ^6.0.0 || ^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/experimental-utils#4.33.0 requires a peer of eslint#* but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/parser#4.33.0 requires a peer of eslint#^5.0.0 || ^6.0.0 || ^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ionic/eslint-plugin#0.0.1 requires a peer of eslint#^5.14.1 but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/eslint-plugin#1.13.0 requires a peer of #typescript-eslint/parser#^1.9.0 but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/eslint-plugin#1.13.0 requires a peer of eslint#^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/experimental-utils#1.13.0 requires a peer of eslint#* but none is installed. You must install peer dependencies yourself.
npm WARN #ionic/prettier-config#2.0.0 requires a peer of prettier#^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords#3.5.2 requires a peer of ajv#^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/fire#5.4.2 requires a peer of #angular/common#>=6.0.0 <9 || ^9.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/fire#5.4.2 requires a peer of #angular/core#>=6.0.0 <9 || ^9.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/fire#5.4.2 requires a peer of #angular/platform-browser#>=6.0.0 <9 || ^9.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/fire#5.4.2 requires a peer of #angular/platform-browser-dynamic#>=6.0.0 <9 || ^9.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/fire#5.4.2 requires a peer of firebase#>= 5.5.7 <8 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-prettier#6.15.0 requires a peer of eslint#>=3.14.1 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-import#2.26.0 requires a peer of eslint#^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-jsdoc#39.3.3 requires a peer of eslint#^7.0.0 || ^8.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-prefer-arrow#1.2.3 requires a peer of eslint#>=2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-utils#3.0.0 requires a peer of eslint#>=5 but none is installed. You must install peer dependencies yourself.

Ionic native plugins not syncing showing error: You must install peer dependencies yourself

I have an ionic 3, where I had to update the Camera plugin.
I go the following message:
npm WARN #ionic-native/camera#5.0.0 requires a peer of #ionic-native/core#5.0.0 but none is installed. You must install peer dependencies yourself.
So I then manually installed native/core#5.0.0
After doing that, I received a bunch of warnings:
npm WARN #ionic-native/clipboard#4.9.1 requires a peer of #ionic-native/core#^4.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ionic-native/device#4.7.0 requires a peer of #ionic-native/core#^4.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ionic-native/file#4.9.1 requires a peer of #ionic-native/core#^4.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ionic-native/file-transfer#4.9.1 requires a peer of #ionic-native/core#^4.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ionic-native/in-app-browser#4.12.0 requires a peer of #ionic-native/core#^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ionic-native/network#4.9.1 requires a peer of #ionic-native/core#^4.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ionic-native/screen-orientation#4.7.0 requires a peer of #ionic-native/core#^4.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ionic-native/splash-screen#4.5.3 requires a peer of #ionic-native/core#^4.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ionic-native/status-bar#4.5.3 requires a peer of #ionic-native/core#^4.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ionic-native/toast#4.7.0 requires a peer of #ionic-native/core#^4.2.0 but none is installed. You must install peer dependencies yourself.
I'm not sure what I should do here...
Should I try to find the latest version for each of the new warnings and replace them????
I'm afraid I will break my app, but don't know.
Thanks for any advice!!

Install Ionic behind a corporate firewall

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.

npm WARN deprecated browserslist#2.11.3: Browserslist 2 could fail on reading Browserslist >3.0

I'm using ionic 3 whatsapp clone github project but when i run ionic serve command got this error when i try to install appscripts Error npm WARN deprecated browserslist#2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
Uninstal Ionic and Cordova:
npm uninstall cordova ionic
Then clean cache:
npm cache clean -f
Then install ionic and cordova again:
npm install -g ionic#3.4.0
npm install -g cordova#7.0.1
Worked for me!
I had the same problem and fixed it by using the following command in the project directory:
npm install
This will install needed packages, so the project can work properly.
See also:
npm deprecated WARN for newly created app #4926
The error itself comes from the package.json file in the browserslist folder in your project.
"deprecated": "Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools."
I'm installing Laravel but get the same error.
I allowed the npm install to go all thr way through and scrolled up. There are some issues present in mine. Will possibly say something like the below.
npm WARN ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0 but none is
installed. You must install peer dependencies yourself.
npm WARN img-loader#3.0.0 requires a peer of imagemin#^5.0.0 but none
is installed. You must install peer dependencies yourself. npm WARN
optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4
(node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY:
Unsupported platform for fsevents#1.2.4: wanted
{"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
You can run npm install again if you'd like and this should give you the new errors in a more compact area.
-note: notice the commands below correspond with what is stated after "requires a peer of..."
npm i ajv
npm i imagemin#5.0.0
npm install
Not sure why, but the imagemin wouldn't work unless I specified the version.
At this point I only had one error left
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4
(node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY:
Unsupported platform for fsevents#1.2.4: wanted
{"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
I believe this has to do with me being on a windows machine. If you get this error just force it. If anyone has a better solution at this point I'd love to hear it.
npm i -f
You could try a reset.
rm -rf node_modules
rm package-lock.json yarn.lock
npm cache clear --force
npm install
I fixed this issue by putting required binaries in the .bin folder under node_modules folder