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.
Related
I'm having a problem trying to upload a video using cordova-plugin-file-transfer.
Where this.video equals file: ///storage/emulated/0/DCIM/Camera/20210706_134119.mp4
code:
uploadVideo(idPublicacion) {
this.alertas.presentLoading('Wait, please');
this.fileTransfer = this.transfer.create();
let options: FileUploadOptions = {
fileKey: 'video',
fileName: new Date().getTime() + ".mp4",
httpMethod: 'POST',
// chunkedMode: false,
headers: {
"Content-Type": "multipart/form-data",
'authorization': 'Bearer ' + this.token
},
mimeType: 'video/mp4'
}
this.uploadText = "uploading...";
this.fileTransfer.upload(this.video,
http://ec2-54-167-83-212.compute-1.amazonaws.com:8080/jagersocial_back/api/social/uploadVideo?idPublicacion=${idPublicacion} ,
options).then(async (data) => {
alert("transferencia hecha = " + JSON.stringify(data));
this.uploadText = "";
this.alertas.dismissLoading();
await this.modalController.dismiss(this.description);
}, (errorTransfer) => {
console.log('Error de transfer: ', errorTransfer);
this.uploadText = "";
this.alertas.dismissLoading();
});
}
The resources used for the project are:
Ionic:
Ionic CLI : 5.4.6 (C:\Users\galac\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : #ionic/angular 4.11.10
#angular-devkit/build-angular : 0.1000.5
#angular-devkit/schematics : 8.1.3
#angular/cli : 10.0.5
#ionic/angular-toolkit : 2.2.0
Cordova:
Cordova CLI : 10.0.0
Cordova Platforms : android 9.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 20 other plugins)
Utility:
cordova-res : 0.8.1
native-run : 0.2.8
System:
Android SDK Tools : 26.1.1 (C:\Users\galac\AppData\Local\Android\Sdk)
NodeJS : v10.16.3 (C:\Program Files\nodejs\node.exe)
npm : 7.16.0
OS : Windows 10
Cordova Plugins:
com-badrit-base64 0.2.0 "Base64"
com-sarriaroman-photoviewer 1.2.4 "PhotoViewer"
cordova-plugin-advanced-http 2.4.1 "Advanced HTTP plugin"
cordova-plugin-android-permissions 1.0.2 "Permissions"
cordova-plugin-camera 4.1.0 "Camera"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-filechooser 1.2.0 "File Chooser"
cordova-plugin-filepath 1.6.0 "cordova-plugin-filepath"
cordova-plugin-fingerprint-aio 3.0.1 "FingerprintAllInOne"
cordova-plugin-geolocation 4.0.2 "Geolocation"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview"
cordova-plugin-media-capture 3.0.3 "Capture"
cordova-plugin-network-information 2.0.2 "Network Information"
cordova-plugin-request-location-accuracy 2.3.0 "Request Location Accuracy"
cordova-plugin-splashscreen 5.0.3 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-streaming-media 2.3.0 "StreamingMedia"
cordova-plugin-video-editor 1.1.3 "VideoEditor"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-sqlite-storage 4.0.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
I also share a screenshot of the error sent by the file-trasnfer plugin
enter image description here
If someone can help me I would appreciate it very much
Thanks for any help, getting error message "Error: Native modules for sensors not available. Did react-native link run successfully?" when running npx react-native start
npx react-native run-android gives this error: > Task :app:processDebugManifest FAILED
right after installing react-native-sensors.
Install procedure:
npx react-native init proj8
cd proj8
npm install react-native-sensors --save
npx react-native link react-native-sensors
The last command reported successful but when I went through the manual Android procedure some parts were not done as follows:
import com.sensors.RNSensorsPackage;
was in android/app/src/main/java/[...]/MainApplication.java
new RNSensorsPackage()
was not there, I added as follows:
#Override
protected List<ReactPackage> getPackages() {
#SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
packages.add(new RNSensorsPackage());
return packages;
}
include ':react-native-sensors'
project(':react-native-sensors').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sensors/android')
were both there in android/settings.gradle
dependencies {
implementation project(':react-native-sensors')
implementation fileTree(dir: "libs", include: ["*.jar"])
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
I had to add implementation project(':react-native-sensors')
I don't think my code matters yet but App.js:
import React, {useState, useEffect, useRef} from 'react';
import { StyleSheet,ScrollView,SafeAreaView,Platform, View,Text } from 'react-native';
export default function App() {
var Rndr =
<Text>asdf</Text>
return Rndr
}
package.json:
{
"name": "proj8",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"react": "16.13.1",
"react-native": "0.63.3",
"react-native-sensors": "^7.0.1"
},
"devDependencies": {
"#babel/core": "^7.8.4",
"#babel/runtime": "^7.8.4",
"#react-native-community/eslint-config": "^1.1.0",
"babel-jest": "^25.1.0",
"eslint": "^6.5.1",
"jest": "^25.1.0",
"metro-react-native-babel-preset": "^0.59.0",
"react-test-renderer": "16.13.1"
},
"jest": {
"preset": "react-native"
}
}
I encountered the same problem. This occurs because react-native-sensors has a minsdk version is 17 and react-native's default minsdk version is 16 Its quite easy to solve.
Just go to android/build.gradle
Change minSdkVersion to anything above 17
Before
ext {
buildToolsVersion = "29.0.2"
minSdkVersion = 16
compileSdkVersion = 29
targetSdkVersion = 29
}
After
ext {
buildToolsVersion = "29.0.2"
minSdkVersion = 19
compileSdkVersion = 29
targetSdkVersion = 29
}
When attempting to package a nuxt component, I get the above error. I am running nuxt 2.4.5, #babel/core 7.0.0 and rollup 1.4.0.
Does anyone have any thoughts?
Thanks in advance..
npm run script:
"build:es": "rollup --config build/rollup.config.js --format es --file dist/cxl-nuxt-map.esm.js"
Command :
nr build:es
cxl-nuxt-map#1.0.0 build:es /Users/userinfo/Projects/cxl-nuxt-map rollup --config build/rollup.config.js --format es --file dist/cxl-nuxt-map.esm.js
index.js → dist/cxl-nuxt-map.esm.js...
Stack Trace:
[!] (babel plugin) Error: .sourceMap must be a boolean, "inline", "both", or undefined
index.js
Error: .sourceMap must be a boolean, "inline", "both", or undefined
at assertSourceMaps (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/#babel/core/lib/config/validation/option-assertions.js:65:11)
at Object.keys.forEach.key (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/#babel/core/lib/config/validation/options.js:107:5)
at Array.forEach (<anonymous>)
at validateNested (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/#babel/core/lib/config/validation/options.js:83:21)
at validate (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/#babel/core/lib/config/validation/options.js:74:10)
at file (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/#babel/core/lib/config/config-chain.js:174:34)
at cachedFunction (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/#babel/core/lib/config/caching.js:33:19)
at buildRootChain (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/#babel/core/lib/config/config-chain.js:120:36)
at loadPrivatePartialConfig (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/#babel/core/lib/config/partial.js:85:55)
at Object.loadPartialConfig (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/#babel/core/lib/config/partial.js:110:18)
at Object.babel.loadPartialConfig (/Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/rollup-plugin-babel/src/index.js:80:20)
at /Users/dan.mahoney/Projects/cxl-nuxt-map/node_modules/rollup/dist/rollup.js:17051:25
at process.runNextTicks [as _tickCallback] (internal/process/next_tick.js:47:5)
at Function.Module.runMain (internal/modules/cjs/loader.js:804:11)
at internal/main/run_main_module.js:21:11
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cxl-nuxt-map#1.0.0 build:es: `rollup --config build/rollup.config.js --format es --file dist/cxl-nuxt-map.esm.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cxl-nuxt-map#1.0.0 build:es script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/dan.mahoney/.npm/_logs/2019-03-01T20_10_17_889Z-debug.log
Rollup.config.js:
/* rollup.config.js */
import vue from 'rollup-plugin-vue';
import babel from 'rollup-plugin-babel';
import commonjs from 'rollup-plugin-commonjs';
import postcss from 'rollup-plugin-postcss';
import replace from 'rollup-plugin-replace';
import { plugin as analyze } from 'rollup-plugin-analyzer';
export default {
input: 'index.js',
output: {
name: 'CxlNuxtMap',
exports: 'named',
},
plugins: [
postcss({
extensions: ['.css'],
runtimeHelpers: true,
exclude: 'node_modules/**',
}),
vue(),
babel({
exclude: 'node_modules/**',
}),
replace({
'process.env.INCLUDE_DEPS': JSON.stringify('false'),
}),
replace({
'process.env.NODE_ENV': JSON.stringify('production'),
}),
commonjs({
namedExports: {},
}),
analyze({ stdout: true }),
],
};
Found in the problem in my .babelrc file. The offending line was:
"sourceMap": "true",
should be:
"sourceMaps": true,
I am working with Ionic 3 and Stripe.
I am seeing this error on iOS Xcode debug.
2018-07-04 16:40:49.873337-0400 TestApp[2943:7783516] CDVPlugin class
CordovaStripe (pluginName: CordovaStripe) does not exist.
2018-07-04
16:40:49.873443-0400 TestApp[2943:7783516] ERROR: Plugin
'CordovaStripe' not found, or is not a CDVPlugin. Check your plugin
mapping in config.xml.
2018-07-04 16:40:49.873527-0400
TestApp[2943:7783516] -[CDVCommandQueue executePending] [Line 142]
FAILED pluginJSON =
["CordovaStripe1777748815","CordovaStripe","setPublishableKey",["pk_test_12345678900"]]
my config.xml
<plugin name="cordova-plugin-stripe" spec="~1.5.3" />
app.module.ts
import { Stripe } from '#ionic-native/stripe';
... providers: [ ...
Stripe ] }) export class AppModule {}
> package.json "dependencies": {
> "#ionic-native/stripe": "^4.9.0",
>
> "cordova-plugin-stripe": {}
> },
> "platforms": [
> "android",
> "ios"
> ]
Any help is appreciated.
Thanks in advance
Phil
I found the answer.. This was very strange.
ionic cordova platform remove ios
ionic cordova platform add ios
npm install
exit out of xcode
restart and resign in xcode..
All seems to be working now..
Thanks
Phil
I just migrated my project from angulardart 3.1.0 to 4.0.0 my pubspec.yaml was:
dependencies:
angular2: ^3.1.0
http: ^0.11.0
#...other deps
dev_dependencies:
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
- angular2:
platform_directives:
- 'package:angular2/common.dart#COMMON_DIRECTIVES'
platform_pipes:
- 'package:angular2/common.dart#COMMON_PIPES'
entry_points: web/main.dart
resolved_identifiers:
BrowserClient: 'package:http/browser_client.dart'
Client: 'package:http/http.dart'
- dart_to_js_script_rewriter
- $dart2js:
sourceMaps: true
and became :
dependencies:
angular: ^4.0.0
angular_router: ^1.0.2
angular_components: ^0.8.0
http: ^0.11.0
#... other deps
dev_dependencies:
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
- angular:
entry_points: web/main.dart
- $dart2js:
sourceMaps: true
- dart_to_js_script_rewriter
My issue is that in dartium (Version 50.0.2661.108 (64-bit) "on mac") I have this error on startup:
VM970:1 Uncaught Unhandled exception:
Unsupported operation: Using the 'angular2' transformer is required.
Please see https://webdev.dartlang.org/angular/tutorial for setup instructions,
and ensure your 'pubspec.yaml' file is configured to invoke the 'angular2'
transformer on your application's entry point.
#0 bootstrap (package:angular/src/platform/bootstrap.dart:107:5)
#1 main (http://localhost:3000/web/main.dart:50:3)
<asynchronous suspension>
And when I try to run pub build it does not recognize ngIf and ngFor :
Error: Template parse errors: line 13, column 11 of UserListPopup: ParseErrorLevel.FATAL: Property binding ngIf not used by any directive on an embedded template
For reference, this is my entire pubspec.yaml now:
name: share_place
description: Collaborate around your documents in a seamless way
version: 0.0.1
environment:
sdk: '>=1.24.0 <2.0.0'
dependencies:
angular: ^4.0.0
angular_router: ^1.0.2
angular_components: ^0.8.0
http: ^0.11.0
stream_transformers: ^0.3.0
http_server: any
js: ^0.6.0
uuid: ^0.5.3
croppie_dart: ^2.4.1
stack_trace: any
source_map_stack_trace: any
source_maps: any
validator: ">=0.0.4 <0.1.0"
dev_dependencies:
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
- angular:
entry_points:
- web/main.dart
- $dart2js:
sourceMaps: true
- dart_to_js_script_rewriter
This is reproducible on twos machines I tested to upgrade dart on (windows and mac). I still didn't try to uninstall reinstall
Here's the content of my main.dart there's nothing special I think:
int version;
Future loadLastVersion() async {
String version = await html.HttpRequest.getString('/sp/util/loadAppVersion');
if (conf.appVersion != version) {
if (conf.isWebApp) {
html.window.alert("you have an old version : ${conf.appVersion} we must load the new version :${version}");
html.window.location.assign("${conf.remoteUrl}/v${version}");
} else {
html.window.alert("A new version ${version} is available! Please download it from : https://www.share.place/downloads");
}
}
}
Future main() async {
loadLastVersion();
Logger.root.level = Level.FINE;
Logger.root.onRecord.listen((LogRecord rec) {
if (rec.level == Level.SEVERE || rec.level == Level.WARNING)
html.window.console.error('${rec.level.name} - ${rec.loggerName} : ${rec.message}');
else if (rec.level == Level.INFO)
html.window.console.info('${rec.level.name} - ${rec.loggerName} : ${rec.message}');
else
html.window.console.debug('${rec.level.name} - ${rec.loggerName} : ${rec.message}');
});
bootstrap(AppComponent, [provide(Client, useClass: BrowserDataService), provide(ExceptionHandler, useClass: ErrorHandler), Environment, EventBus]
// Using a real back end? Import browser_client.dart and change the above to
// [provide(Client, useFactory: () => new BrowserClient(), deps: [])]
);
}
This is not supported anymore
platform_directives:
- 'package:angular2/common.dart#COMMON_DIRECTIVES'
platform_pipes:
- 'package:angular2/common.dart#COMMON_PIPES'
You need to add to #Component(...)
directives: const [COMMON_DIRECTIVES]
pipes: const [COMMON_PIPES]
to every component where you use them.