I tried using react-native-debugger for debugging my application developed in react-native. I found the react-native debugger is not working as my react-native is in version 0.63.4 and the react-native debugger will only support version till 0.62. hence they are not connecting with each other.
I just want either to downgrade my react-native to 0.62 or to upgrade react-native debugger.
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"expo": "~40.0.0",
"expo-status-bar": "~1.0.3",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
"react-native-web": "~0.13.12"
},
"devDependencies": {
"#babel/core": "~7.9.0"
},
"private": true
}
Please help me to resolve this problem as i am a newbie to this react-native.
Thank you
Its better to not use "react-native-debugger" cause downgrading react native version for this package in not a good practice.
hope you get your answer.
Related
Hi, Waiting for connectivity with ionic-app-scripts continues with
ionic serve--lab?
[app-scripts] [18:17:21] tslint: ...orkSpace_Ionic3_MobileApp/prototype/src/pages/profile-details/profile-details.ts, line: 2
[INFO] Waiting for connectivity with ionic-app-scripts...
[INFO] Waiting for connectivity with ionic-app-scripts...
[INFO] Waiting for connectivity with ionic-app-scripts...
Ionic Info :
Ionic:
ionic (Ionic CLI) : 4.0.3 (C:\Users\user\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
#ionic/app-scripts : 3.1.11
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : browser 5.0.3
System:
Android SDK Tools : 26.1.1
NodeJS : v9.1.0 (C:\Program Files\nodejs\node.exe)
npm : 5.5.1
OS : Windows 10
Environment:
ANDROID_HOME : C:\Users\user2\AppData\Local\Android\Sdk
Below I have updated mine package.json file.
package.json
{
"name": "name",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build --aot --minifyjs --minifycss --release",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
Try npm run start instead of ionic serve.
This will work.
Try the modified part. And try executing "npm start" command
{
"name": "name",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build --aot --minifyjs --minifycss --release",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"start": "ionic-app-scripts serve" //instead of ionic:serve, write start
},
If none of these works,
then make sure your FIREWALL is OFF. (into antivirus software as well.)
Check whether you have installed any Antivirus for protection
If yes turn off Browser protection and do ionic serve --host 0.0.0.0
You can turn it on after a successful serve.
The reason is in that the app starts with 0.0.0.0 IP address.
Try to add in our command "--address localhost" part.
So
ionic serve --address localhost
Do not downgrade the node version, update the version of "app-scripts":
To get the latest #ionic/app-scripts, please run:
npm install #ionic/app-scripts#latest --save-dev
I got this error only when I was connected to VPN. Once I turned VPN off, It start working again.
If you are using Ionic 6 and you came here looking for a solution to the following problem (like me):
Waiting for connectivity with ng...
Then check this answer, it's probably the solution to all your problems (remember to upvote if it helped you):
https://stackoverflow.com/a/74412994/6499181
I did basic set up of Protractor cucumber in "visual studio code" and everything works fine when I run it from the terminal. However when I debug it through visual studio code it gives me version error. I have not installed Cucumber globally. I installed it through npm install in the local directory but still the error message says that I am keeping two different versions. How come it be possible?
This error message should also come in the run mode why is it coming only in the debug mode. Please see below error.
[18:34:15] I/launcher - Running 1 instances of WebDriver
logger.js:158
[18:34:15] I/local - Starting selenium standalone server...
logger.js:158
[18:34:16] I/local - Selenium standalone server started at
http://10.12.2.155:60837/wd/hub
logger.js:158
Unhandled rejection Error:
debuggability.js:868
You appear to be executing an install of cucumber (most likely a global
install)
that is different from your local install (the one required in your support
files).
For cucumber to work, you need to execute the same install that is required
in your support files.
Please execute the locally installed version to run your tests.
Executed Path: D:\Prog Test\protractor-cucumber-
master\node_modules\cucumber\lib\index.js
Local Path: d:\Prog Test\protractor-cucumber-
master\node_modules\cucumber\lib\index.js
at D:\Prog Test\protractor-cucumber-
master\node_modules\cucumber\src\cli\install_validator.js:17:11
at Generator.next ()
at Generator.tryCatcher (D:\Prog Test\protractor-cucumber-
master\node_modules\bluebird\js\release\util.js:16:23)
at PromiseSpawn._promiseFulfilled (D:\Prog Test\protractor-cucumber-
master\node_modules\bluebird\js\release\generators.js:97:49)
at Promise._settlePromise (D:\Prog Test\protractor-cucumber-
master\node_modules\bluebird\js\release\promise.js:574:26)
at Promise._settlePromise0 (D:\Prog Test\protractor-cucumber-
master\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (D:\Prog Test\protractor-cucumber-
master\node_modules\bluebird\js\release\promise.js:693:18)
at Async._drainQueue (D:\Prog Test\protractor-cucumber-
master\node_modules\bluebird\js\release\async.js:133:16)
at Async._drainQueues (D:\Prog Test\protractor-cucumber-
master\node_modules\bluebird\js\release\async.js:143:10)
at Immediate.Async.drainQueues (D:\Prog Test\protractor-cucumber-
master\node_modules\bluebird\js\release\async.js:17:14)
at runCallback (timers.js:794:20)
at tryOnImmediate (timers.js:752:5)
at processImmediate [as _immediateCallback] (timers.js:729:5)
[18:34:25] E/launcher - BUG: launcher exited with 1 tasks remaining
logger.js:158
Below are the dependencies of package.json which got installed after running "npm install"
{
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-register": "^6.26.0",
"chai": "^4.1.2",
"chai-as-promised": "^7.1.1",
"cucumber": "^3.2.1",
"cucumber-html-report": "^0.6.2",
"cucumber-html-reporter": "^3.0.4",
"cucumberjs-allure-reporter": "^1.0.3",
"mkdirp": "^0.5.1",
"protractor": "^5.2.0",
"protractor-cucumber-framework": "^4.1.1"
},
}
Below is my debug configuration of VSCOde
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceRoot}/node_modules/protractor/bin/protractor",
"stopOnEntry": false,
"args": [
"${workspaceRoot}/config/config.js"
],
}
]
}
Add "cwd": "${workspaceFolder}", behind "name": "Launch Program", in your debug configuration, then try again.
I am using Ionic 2 via CLI. In this version they use NPM SCRIPTS as opposed to gulp.
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
I have read about adding custom scripts to the config but am not clear how to do this. this is my current config...
"config": {
"ionic_bundler": "webpack",
"ionic_source_map": "source-map",
"ionic_source_map_type": "eval"
},
I need to create a custom script called "replace" It will be using NPM replace. How can I add this so that when I run ionic serve or build it will run?
Here is the gulp code I want to run.
var gulp = require('gulp');
var replace = require('gulp-string-replace');
var p = require('./package.json');
var version = p.version;
gulp.task('serve:after', ['version']);
console.log('Task init!!!');
gulp.task('version', function() {
gulp.src(["./www/index.html"])
.pipe(replace(/VERSION/g, p.version))
.pipe(gulp.dest('./www/'));
});
Ionic CLI (v3.X) goes directly to gulpfile.js and looks for CLI hooks.
ionic serve:
gulp.task('ionic:watch:before', function() {
console.log("this is run before 'ionic serve'");
});
ionic build:
gulp.task('ionic:build:before', function() {
console.log("this is run before 'ionic build'");
});
so you should add something like this to your gulpfile.js:
gulp.task('ionic:watch:before', ['version']);
gulp.task('ionic:build:before', ['version']);
To simply run your gulp task just add it to your package.json.
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
--> "ionic:build": "ionic-app-scripts build && gulp serve:after",
"ionic:serve": "ionic-app-scripts serve",
"watch": "ionic-app-scripts watch"
}
Note: this will not work if you put the "&& gulp" after ionic:serve - the gulp task will wait for the first part to finish, but ionic serve will start up a dev server and stay running so the second part never executes.
As you want to run your Gulp Task from NPM
Add the gulp-npm-script-sync as follows npm install --save-dev gulp-npm-script-sync
Now we need to sync this gulp task to the package.json as follows
var gulp = require('gulp');
var sync = require('gulp-npm-script-sync');
// your gulpfile contents
sync(gulp);
Every time you update your gulpfile with a new task it will update your package.json.
You can even throw it inside a gulp task:
gulp.task('sync', function () {
sync(gulp);
}
First, you have to copy and existing task that you want to modify and paste in your source code /project/task. Then add your task in that file. and change package.json to overwrite ionic 2 default config.
"config": {
"ionic_cleancss": "./task/cleancss.config.js"
},
More info :
https://github.com/ionic-team/ionic-app-scripts#custom-configuration
My console.logs stopped showing up when I run 'ionic run android -lc'
It shows up when I hit it in the web browser.
Based on this post I have tried to add this line to my package.json file:
"scripts": { "ionic:build": "ionic-app-scripts build", "ionic:watch": "ionic-app-scripts watch" }
but it gives me an error when I do a 'ionic build android' saying that 'ionic-app-scripts' is not recognized:
Here is my json.package, I highlighted what I added.
I tried to just remove the 'ionic-app-scripts' line in my package.json and it built correctly but it still did not log.
Would appreciate any help.
Thanks.
UPDATE:
I just did a restart with a completely blank copy with 'ionic start moment blank' and I copied my www folder into the clean app. Then I did a npm install and ran my app. I am still not getting console.logs. Could this somehow be happening because of my code in my www folder? I don't understand this. Any ideas? I am running on Ionic 1.
Assuming this is an Ionic 2 app, you are missing the #ionic/app-scripts dependency from your package.json.
The latest is: #ionic/app-scripts": "1.0.0"
Example of a basic fully working ionic 2 package.json can be found in Ionic's conference app demo (https://github.com/driftyco/ionic-conference-app) :
{
"name": "ionic-conference-app",
"description": "Ionic Conference App",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/driftyco/ionic-conference-app.git"
},
"scripts": {
"build": "ionic-app-scripts build",
"clean": "ionic-app-scripts clean",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"#angular/common": "2.2.1",
"#angular/compiler": "2.2.1",
"#angular/compiler-cli": "2.2.1",
"#angular/core": "2.2.1",
"#angular/forms": "2.2.1",
"#angular/http": "2.2.1",
"#angular/platform-browser": "2.2.1",
"#angular/platform-browser-dynamic": "2.2.1",
"#angular/platform-server": "2.2.1",
"#ionic/storage": "1.1.7",
"ionic-angular": "2.0.0-rc.5-201701112208",
"ionic-native": "2.2.11",
"ionicons": "3.0.0",
"rxjs": "5.0.0-beta.12",
"sw-toolbox": "3.4.0",
"zone.js": "0.6.26"
},
"devDependencies": {
"#ionic/app-scripts": "1.0.0",
"typescript": "2.0.9"
}
}
Take notice of the #ionic/app-scripts here.
To ensure a clean build, delete your current node_modules folder, and do a fresh npm install once you add the required dependencies.
I have got this ionic serve command problem that I just get this error Hmm,we can't reach this page and when I try to see the result of ionic address command, I get nothing to see. I don't know what is the problem in here. Please someone assist. Thanks
"scripts": {
"build": "ionic-app-scripts build",
"watch": "ionic-app-scripts watch",
"serve:before": "watch",
"emulate:before": "watch",
"deploy:before": "build",
"build:before": "build",
"run:before": "watch"
}
make sure that package.json (inside scripts )has all the above mentioned lines........