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.
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';
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;
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
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$