Ionic serve command landing on to balnk screen - ionic-framework

I run the command "ionic serve" landed to blank screen.
I have installed all the node modules using "npm install" & and after that run "ionic serve"
[app-scripts] [11:28:17] tslint: ...p_source_code/ionicecommerce_muzammul/src/pages/select-country/select-country.ts, line: 8
[app-scripts] All imports on this line are unused.
[app-scripts] L7: import { ConfigProvider } from '../../providers/config/config';
[app-scripts] L8: import { Http } from '#angular/http';
[app-scripts] L9: import { LoadingProvider } from '../../providers/loading/loading';
[app-scripts] [11:28:17] tslint: ...f/app_source_code/ionicecommerce_muzammul/src/pages/select-zones/select-zones.ts, line: 8
[app-scripts] [11:28:17] tslint: .../Users/Saif/app_source_code/ionicecommerce_muzammul/src/auth/auththentication.ts, line: 2
[app-scripts] [11:28:17] tslint: .../Users/Saif/app_source_code/ionicecommerce_muzammul/src/auth/auththentication.ts, line: 3
[app-scripts] [11:28:17] tslint: .../Saif/app_source_code/ionicecommerce_muzammul/src/pages/my-account/my-account.ts, line: 53
[app-scripts] All imports on this line are unused.
[app-scripts] L7: import { ConfigProvider } from '../../providers/config/config';
[app-scripts] L8: import { Http } from '#angular/http';
[app-scripts] L9: import { LoadingProvider } from '../../providers/loading/loading';
[app-scripts] All imports on this line are unused.
[app-scripts] L1: import { Injectable } from '#angular/core';
[app-scripts] L2: import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '#angular/common/http';
[app-scripts] L3: import { Observable } from 'rxjs/Observable';
[app-scripts] All imports on this line are unused.
[app-scripts] L2: import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '#angular/common/http';
[app-scripts] L3: import { Observable } from 'rxjs/Observable';
[app-scripts] L4: #Injectable()
[app-scripts] 'currenrtPassword' is declared but never used.
[app-scripts] L52: //this.shared.customerData.password="1234"
[app-scripts] L53: let currenrtPassword = this.myAccountData.currentPassword;
[app-scripts] L54: let newPassword = this.myAccountData.password;
[app-scripts] 'newPassword' is declared but never used.
[app-scripts] L53: let currenrtPassword = this.myAccountData.currentPassword;
[app-scripts] L54: let newPassword = this.myAccountData.password;
[app-scripts] L55: // console.log(currenrtPassword + " " + newPassword);
[app-scripts] 'require' is declared but never used.
[app-scripts] L22: declare var braintree;
[app-scripts] L23: declare var require: any
[app-scripts] L24: declare var Buffer: any
[app-scripts] 'Buffer' is declared but never used.
[app-scripts] L23: declare var require: any
[app-scripts] L24: declare var Buffer: any
[app-scripts] [11:28:17] tslint: .../Saif/app_source_code/ionicecommerce_muzammul/src/pages/my-account/my-account.ts, line: 54
[app-scripts] [11:28:17] tslint: C:/Users/Saif/app_source_code/ionicecommerce_muzammul/src/pages/order/order.ts, line: 23
[app-scripts] [11:28:17] tslint: C:/Users/Saif/app_source_code/ionicecommerce_muzammul/src/pages/order/order.ts, line: 24
[app-scripts] [11:28:17] lint finished in 6.25 s
After running ionic serve i am getting this on my console window & blank screen open on my browser. Development server runs on localhost:8100

Hey its your code have unused declarations and imports
In your code editor add plugin called tslint it will show lint issues
EG:-->
import { LoadingProvider } from '../../providers/loading/loading';
[app-scripts] All imports on this line are unused.

Related

Sass giving Error Ionic serve Compile Failed

I’m having isues with ionic cordova run android -l
everything was working good. I’ve updated my nodejs on pc. Now i’m having isues with build.
[app-scripts] [10:41:36] sass started ...
[app-scripts] [10:41:37] sass: src/theme/variables.scss, line: 36
[app-scripts] (skyblue: #488aff, primaryText: #727270, headers: #5e5e5e, secondary: #32db64, danger: #ca2929, light:
[app-scripts] #f4f4f4, dark: #222, orange: #fc6108, sos: #7a08fc, blu: #3e6aca, gray: #7e7e7e, activeBg: #dadedf,
[app-scripts] disabled: (contrast: #aaaaaa, base: #e7e7e7), green: (contrast: #fafafa, base: #2ecc71), primary: (contrast:
[app-scripts] #f4f4f4, base: #727270), primary-menu: (contrast: #33cfff, base: #f4f4f4), redIcons: (contrast: #ca2929,
[app-scripts] base: #f4f4f4)) isn't a valid CSS value.
[app-scripts] L36: $colors:(
[app-scripts] L37: skyblue: #488aff,
[INFO] Development server running!
IONIC INFO
Ionic CLI : 5.4.1 (/Users/pc-areaindustries/.npm-global/lib/node_modules/ionic) Ionic Framework :
ionic-angular 3.9.8 #ionic/app-scripts : 3.2.4 Cordova: Cordova CLI : 9.0.0 (cordova-lib#9.0.1)
Cordova Platforms : android 7.1.4 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3,
cordova-plugin-ionic-webview 4.0.0, (and 20 other plugins) Utility: cordova-res : 0.6.0 native-run : 0.2.7 (update available: 0.2.8)
System: Android SDK Tools : 26.1.1 (/Users/pc-areaindustries/Library/Android/sdk)
ios-deploy : 1.9.4 ios-sim : 7.0.0 NodeJS : v10.16.0 (/usr/local/bin/node) npm : 6.11.3 OS : macOS Mojave Xcode : Xcode 10.1 Build version 10B61
Inside Variable.scss i have this var
$colors:(
skyblue: #488aff,
primaryText:#727270,
headers: #5e5e5e,
secondary: #32db64,
danger: #ca2929,
light: #f4f4f4,
dark: #222,
orange: #fc6108,
sos: #7a08fc,
blu: #3e6aca,
gray: #7e7e7e,
activeBg: #dadedf,
disabled: (
contrast: #aaaaaa,
base: #e7e7e7
),
green: (
contrast: rgb(250, 250, 250), /* color */
base: #2ecc71 /* background */
),
primary: (
contrast: #f4f4f4,
base: #727270
),
// side menu color
primary-menu: (
contrast: #33cfff,
base: #f4f4f4
),
redIcons: (
contrast: #ca2929,
base: #f4f4f4
),
);
does anyone have the solution? already did this:
removed “node_modules” then npm install
npm update
npm rebuild node-sass
etc
Error was in the variable names. So i solved it by fixing the name.

Cannot find module "rxjs/observable" on build. IONIC

I am working on an ionic app that is using AngularFire2. But when I push up the code to ionic i get a build error:
ionic-app-scripts build
[22:28:07] typescript: src/providers/sermon/sermon.ts, line: 4
Cannot find module 'rxjs/observable'.
L3: import { AngularFirestore, AngularFirestoreCollection} from 'angularfire2/firestore';
L4: import { Observable } from 'rxjs/observable';
[22:28:07] ionic-app-script task: "build"
[22:28:07] Error: Failed to transpile program
Error: Failed to transpile program
I don't know what is going on... Could someone point me in the right direction for this?
This is a simple typo mistake, pls replace that,
import { Observable } from 'rxjs/Observable'; // 'O' is capital in 'rxjs/Observable'
With the new RxJs 6 it would be
import { Observable } from 'rxjs/Rx';

ionic 3 build VirtualStats stopped

Yesterday my app was working fine on browser but now I get an error:
[21:01:05] transpile started ...
[21:01:11] typescript: .../feederhorgasz/node_modules/#ionic/app-scripts/dist/util/virtual-file-utils.d.ts, line: 3
Class 'VirtualStats' incorrectly implements interface 'Stats'. Property 'atimeMs' is missing in type
'VirtualStats'.
L2: export declare class VirtualStats implements Stats {
L3: protected _path: string;
L4: protected _ctime: Date;
Error: Failed to transpile program
at BuildError.Error (native)
at new BuildError (C:\Users\Thomas\mobiledevelopment\feederhorgasz\node_modules\#ionic\app-scripts\dist\util\errors.js:16:28)
at C:\Users\Thomas\mobiledevelopment\feederhorgasz\node_modules\#ionic\app-scripts\dist\transpile.js:159:20
at transpileWorker (C:\Users\Thomas\mobiledevelopment\feederhorgasz\node_modules\#ionic\app-scripts\dist\transpile.js:107:12)
at Object.transpile (C:\Users\Thomas\mobiledevelopment\feederhorgasz\node_modules\#ionic\app-scripts\dist\transpile.js:64:12)
at C:\Users\Thomas\mobiledevelopment\feederhorgasz\node_modules\#ionic\app-scripts\dist\build.js:106:82
Put this code on Your project folder\node_modules#ionic\app-scripts\dist\util\virtual-file-utils.d.ts
readonly atimeMs: any;
readonly mtimeMs: any;
readonly ctimeMs: any;
readonly birthtimeMs: any;

could not find cucumber plugin for protractor test

i am brand new to protractor and did setup as per the instructions from the protractor website. When i try to run the protractor test with the a cucumber framework i always get "Error: Error: Cannot find module 'cucumber'". Any help on this? below are by configurations.
cucumber-conf.js
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
capabilities: {
browserName:'chrome'
},
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
specs: [
'./cucumber/*.feature'
],
cucumberOpts: {
require: ['./cucumber/*.js'],
tags: [],
strict: true,
format: ["pretty"],
dryRun: false,
compiler: []
},
onPrepare: function () {
browser.manage().window().maximize();
}
};
when i run protractor cucumber-conf.js i get below error.
/opt/protractor_tests
➔ protractor cucumber-conf.js
(node:5681) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[12:06:55] I/launcher - Running 1 instances of WebDriver
[12:06:55] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[12:06:57] E/launcher - Error: Error: Cannot find module 'cucumber'
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at Object.module.exports.load (/opt/protractor_tests/node_modules/protractor-cucumber-framework/lib/cucumberLoader.js:5:12)
at Object.<anonymous> (/opt/protractor_tests/node_modules/protractor-cucumber-framework/index.js:5:48)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
[12:06:57] E/launcher - Process exited with error code 100

protractor sets error without opening browser

i download a new ionic project and i am trying to test the header contains these elements ""
my config file is
exports.config = {
framework: 'jasmine2',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['../www/head.spec.js'],
multiCapabilities: [
{
browserName: 'chrome'
}]
}
named this as e2e.js
my test case file is
describe('header Module', function(){
var header;
beforeEach(function() {
header = element(by.css('title'));
});
it('should check title text',function(){
expect(header.getText()).toContain('Ionic Blank Starter');
});
});
and i named this as head.spec.js
my issue is that i could see the browser opened and my protractor sends an error msg
empresss-Mac-mini:myApp admin$ protractor test/e2e.js
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:172
callback(new Error(message));
^
Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
at ClientRequest. (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:172:16)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
at Socket.socketErrorListener (_http_client.js:259:9)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at emitErrorNT (net.js:1253:8)
at doNTCallback2 (node.js:439:9)
at process.tickCallback (node.js:353:17)
From: Task: WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:157:22)
at Function.webdriver.WebDriver.createSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:30)
at [object Object].Builder.build (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/builder.js:445:22)
at [object Object].DriverProvider.getNewDriver (/usr/local/lib/node_modules/protractor/lib/driverProviders/driverProvider.js:38:7)
at [object Object].Runner.createBrowser (/usr/local/lib/node_modules/protractor/lib/runner.js:182:37)
at /usr/local/lib/node_modules/protractor/lib/runner.js:263:21
at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:797:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:826:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:759:13)
at /usr/local/lib/node_modules/protractor/node_modules/q/q.js:525:49
[launcher] Process exited with error code 1
could someone help to fix this issue
when i try to webdriver-manager update err msg is displayed
empresss-Mac-mini:~ admin$ webdriver-manager update
fs.js:799
return binding.mkdir(pathModule._makeLong(path),
^
Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/protractor/selenium'
at Error (native)
at Object.fs.mkdirSync (fs.js:799:18)
at Object.<anonymous> (/usr/local/lib/node_modules/protractor/bin/webdriver-manager:126:6)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:467:10)
at startup (node.js:134:18)
at node.js:961:3
empresss-Mac-mini:~ admin$