Ionic 2 upgrade: Ionic Framework Version: 2.0.0-beta.11 - ionic2

I am trying to upgrade my Ionic environment to the latest version.
I currently have:
Your system information:
ordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.1.14
Ionic App Lib Version: 2.1.7
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.2.2
Xcode version: Not installed
Question
How do I get the following upgraded:
Ionic Framework Version: 2.0.0-beta.11
I have tried:
npm install -g ionic
Which updated this to the latest:
Ionic App Lib Version: 2.1.7
Thank you
UPDATE
Here is my package.json.
{
"dependencies": {
"#angular/common": "^2.0.0-rc.4",
"#angular/compiler": "^2.0.0-rc.4",
"#angular/core": "^2.0.0-rc.4",
"#angular/forms": "^0.2.0",
"#angular/http": "^2.0.0-rc.4",
"#angular/platform-browser": "^2.0.0-rc.4",
"#angular/platform-browser-dynamic": "^2.0.0-rc.4",
"#ionic/cloud-angular": "^0.4.0",
"accounts-base-client-side": "^0.1.1",
"accounts-phone": "0.0.1",
"angular2-meteor": "^0.6.2",
"angular2-meteor-polyfills": "^0.1.1",
"angular2-moment": "^0.8.2",
"es6-shim": "^0.35.0",
"ionic-angular": "^2.0.0-beta.11",
"ionic-native": "^1.3.2",
"ionicons": "3.0.0",
"jose-jwe-jws": "git+https://github.com/square/js-jose.git",
"meteor-client-side": "^1.3.4",
"moment": "^2.14.1",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"socket.io": "^1.4.8",
"zone.js": "^0.6.12"
},
"devDependencies": {
"del": "2.2.0",
"gulp": "3.9.1",
"gulp-watch": "4.3.5",
"ionic-gulp-fonts-copy": "^1.0.0",
"ionic-gulp-html-copy": "^1.0.0",
"ionic-gulp-sass-build": "^1.0.0",
"ionic-gulp-scripts-copy": "^2.0.0",
"ionic-gulp-tslint": "^1.0.0",
"ionic-gulp-webpack": "^2.0.0",
"lodash.camelcase": "^4.3.0",
"lodash.upperfirst": "^4.3.1",
"run-sequence": "1.1.5",
"ts-loader": "^0.8.2",
"tslint-ionic-rules": "^0.0.3",
"webpack": "^1.13.2"
},
"name": "theWhoZoo",
"description": "theWhoZoo: An Ionic project",
"cordovaPlugins": [
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"ionic-plugin-keyboard",
{
"variables": {
"SENDER_ID": "xxxxxxxxxxxx"
},
"locator": "phonegap-plugin-push",
"id": "phonegap-plugin-push"
}
],
"cordovaPlatforms": []
}

Did you try npm install ? You can change row at change your package.json file and try npm install

Related

NextJS - null is not an object (evaluating 'anchorElement.parentNode')

I am working on AWS, it works for 1 years with no errors.
Today I made some updtes on my code (I didnt update any packages), and It begins to return this.
I am using AWS CodeBuild, and I guess It must be about that (It may be updated or sth.)
But couldnt resolve tthe problem.
Unhandled Runtime Error
TypeError: null is not an object (evaluating 'anchorElement.parentNode')
Call Stack
eval
[native code]
./src/assets/scss/style.scss
file:///var/app/current/.next/static/chunks/pages/_app.js (827:5)
Here's my codebuild variables:
version: 0.2
phases:
install:
runtime-versions:
nodejs: 14
pre_build:
commands:
- printenv > .env
build:
commands:
- echo Installing dependency...
- npm install -g next#12.0.4-canary.10
- npm install
- echo Compiling the Node.js code
- npm run build
post_build:
commands:
- echo Build completed on `date`
artifacts:
files:
- '**/*'
Here's my packages.json
{
"name": "Try this",
"version": "0.1.0",
"private": true,
"engines" : {
"node" : "14"
},
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "node server.js",
"analyze": "cross-env ANALYZE=true next build",
"analyze:server": "cross-env BUNDLE_ANALYZE=server next build",
"analyze:browser": "cross-env BUNDLE_ANALYZE=browser next build"
},
"dependencies": {
"#fullhuman/postcss-purgecss": "^4.1.3",
"#next/bundle-analyzer": "^11.1.2",
"#sentry/nextjs": "^6.11.0",
"#thecodingmachine/redux-toolkit-wrapper": "^1.3.0",
"#tjoskar/react-lazyload-img": "^1.2.3",
"#uppy/core": "^2.3.0",
"#uppy/progress-bar": "^2.1.0",
"#uppy/react": "^2.2.0",
"#uppy/tus": "^2.3.0",
"#uppy/xhr-upload": "^2.1.0",
"axios": "^0.21.1",
"bootstrap": "^4.6.0",
"cross-env": "^7.0.3",
"express": "^4.17.1",
"file-saver": "^2.0.5",
"framer-motion": "^6.2.9",
"heroku-ssl-redirect": "^0.1.1",
"lottie-web": "^5.7.8",
"moment": "2.24.0",
"moment-timezone": "^0.5.28",
"next": "^12.0.4-canary.10",
"next-compose-plugins": "^2.2.1",
"nextjs-progressbar": "0.0.10",
"nprogress": "^0.2.0",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-preset-env": "^7.4.2",
"react": "^17.0.2",
"react-bootstrap": "^1.0.0",
"react-color-extractor": "^1.1.2",
"react-copy-to-clipboard": "^5.0.3",
"react-countdown": "^2.3.2",
"react-custom-scroll": "^4.2.0",
"react-dom": "^17.0.2",
"react-facebook-pixel": "^1.0.4",
"react-google-recaptcha-v3": "^1.9.8",
"react-hooks-paginator": "^0.4.4",
"react-icons": "^3.11.0",
"react-id-swiper": "^3.0.0",
"react-image-gallery": "^1.1.1",
"react-infinite-scroll-component": "^6.0.0",
"react-input-mask": "^3.0.0-alpha.2",
"react-lightgallery": "^0.6.3",
"react-livechat": "^1.1.1",
"react-lottie": "^1.2.3",
"react-mailchimp-subscribe": "^2.1.0",
"react-modal": "^3.14.3",
"react-modal-video": "^1.2.3",
"react-parallax": "^3.0.3",
"react-redux": "^7.2.0",
"react-scroll": "^1.7.16",
"react-select": "^4.3.1",
"react-slidedown": "^2.4.5",
"react-sticky-box": "^0.9.3",
"react-tippy": "^1.3.4",
"react-toast-notifications": "^2.4.3",
"react-tooltip": "^4.2.21",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"sweetalert2": "^10.16.7",
"swiper": "^6.8.4",
"uuid": "^8.3.2"
},
"devDependencies": {
"#babel/core": "^7.11.6",
"#babel/runtime": "^7.13.10",
"#react-native-community/eslint-config": "^2.0.0",
"#zeit/next-css": "^1.0.1",
"babel-jest": "^26.6.3",
"babel-plugin-module-resolver": "^4.0.0",
"eslint": "^7.13.0",
"eslint-import-resolver-babel-module": "^5.1.2",
"eslint-plugin-import": "^2.22.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.64.0",
"next-purgecss": "^4.0.0",
"react-test-renderer": "17.0.1",
"sass": "^1.26.3"
},
"jest": {
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
],
"moduleNameMapper": {
".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "identity-obj-proxy"
},
"setupFiles": [
"./jest.setup.js"
],
"timers": "fake",
"testEnvironment": "jsdom"
}
}
What could be wrong?
It works on vercel when I try to build,
But It returns error on AWS. (It was working for 1 year)

ionic 2 unmet peer dependency #ionic-native/core#4.3.3

When I am going to install camera, file, file transfer and filepath plugin it displays the error as unmet peer dependency #ionic-native/core#4.3.3.
Commands I used -
npm install --save #ionic-native/camera #ionic-native/file #ionic-native/file-path #ionic-native/transfer
ionic plugin add cordova-plugin-camera --save
ionic plugin add cordova-plugin-file --save
ionic plugin add cordova-plugin-file-transfer --save
ionic plugin add cordova-plugin-filepath --save
Below is my packge.json
"dependencies": {
"#angular/common": "4.4.3",
"#angular/compiler": "4.4.3",
"#angular/compiler-cli": "4.4.3",
"#angular/core": "4.4.3",
"#angular/forms": "4.4.3",
"#angular/http": "4.4.3",
"#angular/platform-browser": "4.4.3",
"#angular/platform-browser-dynamic": "4.4.3",
"#ionic-native/camera": "^4.3.3",
"#ionic-native/core": "^4.3.3",
"#ionic-native/file": "^4.3.3",
"#ionic-native/file-path": "^4.3.3",
"#ionic-native/in-app-browser": "4.3.2",
"#ionic-native/keyboard": "4.3.3",
"#ionic-native/splash-screen": "4.3.2",
"#ionic-native/status-bar": "4.3.2",
"#ionic-native/themeable-browser": "4.3.2",
"#ionic-native/transfer": "^3.14.0",
"#ionic-native/youtube-video-player": "4.3.2",
"#ionic/storage": "2.0.1",
"cordova-android": "6.2.3",
"cordova-browser": "4.1.0",
"cordova-plugin-camera": "2.4.1",
"cordova-plugin-compat": "1.1.0",
"cordova-plugin-device": "1.1.4",
"cordova-plugin-file": "4.3.3",
"cordova-plugin-file-transfer": "1.6.3",
"cordova-plugin-filepath": "1.1.0",
"cordova-plugin-inappbrowser": "1.7.1",
"cordova-plugin-ionic-webview": "1.1.11",
"cordova-plugin-splashscreen": "~4.0.1",
"cordova-plugin-themeablebrowser": "0.2.17",
"cordova-plugin-whitelist": "1.3.1",
"cordova-plugin-youtube-video-player": "1.0.6",
"ionic-angular": "3.7.1",
"ionic-image-loader": "^4.2.1",
"ionic-plugin-keyboard": "~2.2.1",
"ionic2-super-tabs": "4.1.3",
"ionicons": "3.0.0",
"rxjs": "5.4.3",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.18"
},

Illegal Operation on a Directory with Unknown Broccoli Plugin

Output from ember version --verbose && npm --version:
ember-cli: 2.12.1
http_parser: 2.7.0
node: 6.10.2
v8: 5.1.281.98
uv: 1.9.1
zlib: 1.2.11
ares: 1.10.1-DEV
icu: 58.2
modules: 48
openssl: 1.0.2k
os: darwin x64
3.10.10
When I try ember s I have the following error,
Livereload server on http://localhost:49153
Serving on http://localhost:4200/
The Broccoli Plugin: [object Object] failed with:
Error: EISDIR: illegal operation on a directory, read
at Error (native)
at Object.fs.readSync (fs.js:732:19)
at tryReadSync (fs.js:487:20)
at Object.fs.readFileSync (fs.js:535:19)
at /Users/li-xinyang/Desktop/XX_MemoCycle_Firebase/node_modules/broccoli-flatiron/index.js:33:16
at Array.forEach (native)
at readDirectory (/Users/li-xinyang/Desktop/XX_MemoCycle_Firebase/node_modules/broccoli-flatiron/index.js:28:31)
at /Users/li-xinyang/Desktop/XX_MemoCycle_Firebase/node_modules/broccoli-flatiron/index.js:21:15
at tryCatch (/Users/li-xinyang/Desktop/XX_MemoCycle_Firebase/node_modules/rsvp/dist/rsvp.js:539:12)
at invokeCallback (/Users/li-xinyang/Desktop/XX_MemoCycle_Firebase/node_modules/rsvp/dist/rsvp.js:554:13)
The broccoli plugin was instantiated at:
undefined
Below is a list of devDependencies,
package.json File
{
"name": "memo-cycle",
"version": "0.0.0",
"description": "A study tool for serious learner",
"license": "MIT",
"author": "",
"directories": {
"doc": "doc",
"test": "tests"
},
"repository": "",
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember test"
},
"devDependencies": {
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^2.4.1",
"ember-cli": "2.12.1",
"ember-cli-app-version": "^2.0.0",
"ember-cli-babel": "^5.1.7",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-eslint": "^3.0.0",
"ember-cli-gravatar": "^3.8.1",
"ember-cli-htmlbars": "^1.1.1",
"ember-cli-htmlbars-inline-precompile": "^0.3.6",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-qunit": "^3.1.0",
"ember-cli-sass": "^6.1.2",
"ember-cli-shims": "^1.0.2",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-export-application-global": "^1.0.5",
"ember-in-viewport": "^2.1.1",
"ember-inline-svg": "^0.1.10",
"ember-load-initializers": "^0.6.0",
"ember-paper": "^1.0.0-alpha.19",
"ember-power-select": "^1.6.1",
"ember-power-select-with-create": "^0.3.1",
"ember-resolver": "^2.0.3",
"ember-route-action-helper": "^2.0.2",
"ember-simple-auth": "^1.2.2",
"ember-source": "~2.12.0",
"loader.js": "^4.2.3"
},
"engines": {
"node": ">= 4"
},
"private": true
}
It was working fine before my last to commit. What I have done in the last two commits are I remove all .DS_Store files in the last commit and added Firebase deploy config files and install cloud function dependencies via Yarn in the last second commit.
What I have tried to resolve the issues, but the issue persists.
1) Delete all node modules via rm -rf node_modules and re-install them npm install (dependencies were installed via Yarn)
2) Remove the project and clone from the origin
3) Revert back to early commit (issue persists even I revert back to the initial commit and re-install all the dependencies of course)
4) Restart Mac 😅
5) Update .ember-cli file and re-run ember init setup process
The issues is caused by
That plugin looks like it was built for an older version of broccoli, but the basic problem seems that its write function doesn't handle symlinks to directories.
See this GitHub issue for more details
https://github.com/ember-cli/ember-cli/issues/6981

Ionic serve gives typescript errors when updating to ionic-native v3

I get Typescript errors for every item from the native imports, when running ionic serve. This is after I updated to ionic-native v3. All the items from the new #ionic-native are not recognised by Typescript. I updated typescript to different v2 versions but can't get it to work.
I dit not changed any of my other code. It is not only related to the SplashScreen. All my references to the objects I used to import through 'ionic-native' (old style) and now import through #ionic-native/{plugin-name} give these Typescript Errors.
Can anybody please help? Can't serve or build my app at this moment
For example:
property hide does not exist on type typeof SplashScreen
I changed my imports to
import { LocalNotifications } from '#ionic-native/local-notifications';
import { SplashScreen } from '#ionic-native/splash-screen';
import { StatusBar } from '#ionic-native/status-bar';
My ionic info:
ordova CLI: 6.5.0
Ionic Framework Version: 2.2.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.4
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v7.0.0
Xcode version: Not installed
My ionic plugin ls
cordova-plugin-app-event 1.2.0 "Application Events"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-camera 2.4.0 "Camera"
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-console 1.0.6 "Console"
cordova-plugin-device 1.1.5 "Device"
cordova-plugin-fcm 2.1.1 "FCMPlugin"
cordova-plugin-nativestorage 2.2.1 "NativeStorage"
cordova-plugin-splashscreen 4.0.2 "Splashscreen"
cordova-plugin-statusbar 2.2.2 "StatusBar"
cordova-plugin-whitelist 1.3.2 "Whitelist"
cordova-plugin-x-socialsharing 5.1.6 "SocialSharing"
de.appplant.cordova.plugin.local-notification 0.8.4 "LocalNotification"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-barcodescanner 6.0.5 "BarcodeScanner"
My package.json
"dependencies": {
"#angular/common": "2.4.8",
"#angular/compiler": "2.4.8",
"#angular/compiler-cli": "2.4.8",
"#angular/core": "2.4.8",
"#angular/forms": "2.4.8",
"#angular/http": "2.4.8",
"#angular/platform-browser": "2.4.8",
"#angular/platform-browser-dynamic": "2.4.8",
"#angular/platform-server": "2.4.8",
"#ionic/storage": "2.0.0",
"#ionic-native/core": "^3.1.0",
"ionicons": "3.0.0",
"ionic-angular": "2.2.0",
"rxjs": "5.0.1",
"zone.js": "0.7.2",
"sw-toolbox": "3.5.1",
"babel-core": "^6.24.0",
"d": "^1.0.0",
"ng2-translate": "^4.0.0",
"#ionic-native/barcode-scanner": "^3.1.0",
"#ionic-native/local-notifications": "^3.1.0",
"#ionic-native/native-storage": "^3.1.0",
"#ionic-native/social-sharing": "^3.1.0",
"#ionic-native/splash-screen": "^3.1.0",
"#ionic-native/status-bar": "^3.1.0"
},
"devDependencies": {
"#ionic/app-scripts": "^1.1.4",
"#ionic/cli-build-ionic-angular": "0.0.3",
"#ionic/cli-plugin-cordova": "0.0.9",
"typescript": "2.0.9"
}
tsc -v
Version 2.2.1
According to the updated docs here, you need to inject Splashscreen in the constructor.
constructor(private splashScreen: SplashScreen) { }
this.splashscreen.hide();
In previous versions you would use the Splashscreen that was imported directly to call the methods.

Ionic2 #angular dependency in package.json

While creating a new project using "ionic start #appName# blank --v2 --ts" command.
So it shows
"dependencies": {
"#angular/common": "^2.0.0-rc.1",
"#angular/compiler": "^2.0.0-rc.1",
"#angular/core": "^2.0.0-rc.1",
"#angular/http": "^2.0.0-rc.1",
"#angular/platform-browser": "^2.0.0-rc.1",
"#angular/platform-browser-dynamic": "^2.0.0-rc.1",
"#angular/router": "^2.0.0-rc.1",
in package.json.
What is the command to create a new project using old version of ionic2 so that is get "angular2" instead of "#angular" and can use old RouteConfig
I used this configuration for ionic2 beta 5 version.
"dependencies": {
"angular2": "2.0.0-beta.15",
"es6-shim": "^0.35.0",
"ionic-angular": "2.0.0-beta.5-201604211454",
"ionic-native": "^1.1.0",
"ionicons": "3.0.0-alpha.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"zone.js": "^0.6.11"
},
"devDependencies": {
"del": "2.2.0",
"gulp": "3.9.1",
"gulp-watch": "4.3.5",
"ionic-gulp-browserify-es2015": "^1.0.2",
"ionic-gulp-fonts-copy": "^1.0.0",
"ionic-gulp-html-copy": "^1.0.0",
"ionic-gulp-sass-build": "^1.0.0",
"ionic-gulp-scripts-copy": "^1.0.0",
"run-sequence": "1.1.5"
}
you have to delete all from node_modules folder, change package.config file with config from above and run npm install
But you have to take in consideration that this is an old version of ionic (beta5) and angular. My suggestion is to use the latest versions