Can't import the named export 'ɵɵngDeclareNgModule' from non EcmaScript module (only default export is available) - angular2-nativescript

I am getting this error while using angular 11.0 with native script and android (on importing webcam module to app.module from npm):
Error: ./node_modules/ngx-webcam/fesm2015/ngx-webcam.mjs 482:20-42
Can't import the named export 'ɵɵngDeclareNgModule' from non EcmaScript module (only default export is available)

I solved the above error by
migrating my angular application cli version from 11.0 to 12.2.16 (or latest stable version ).
After that, camera feature was working fine

Related

React toastify not properly running when spinning up storybook?

This is the error that keeps showing up when I run yarn storybook. My react-toastify is on v9.0.8.
Can't import the named export 'cloneElement' from non EcmaScript module (only default export is available)

No module named 'selenium.webdriver.safari.options'

Requirements
OS
macOS Monterey 12.3.1
Selenium version
4.1.1
Python
3.10
Safari
15.4 (17613.1.17.1.13)
from selenium.webdriver.safari.options import Options as SafariOptions
self.options = SafariOptions()
ModuleNotFoundError: No module named 'selenium.webdriver.safari.options'
and I can't use desired_capabilities in selenium4 because:
if desired_capabilities:
warnings.warn(
"desired_capabilities has been deprecated, please pass in an Options object with options kwarg",
DeprecationWarning,
stacklevel=2
)
Safari Options was a known bug for Selenium 4 for Py.
This has been resolved - Py safari options #10385
This was merged into release 4.1.3 for Py, update your Selenium version to 4.1.3 or 4.1.4 to resolve the issue.

Error: package com.huawei.hms.maps.util does not exist when using HMS Map SDK 5.1

My Android app worked well with Huawei Map SDK 5.0.0 or lower version. When upgrading to Map SDK 5.0.1 or above version however, I get the error: package com.huawei.hms.maps.util does not exist when using:
import com.huawei.hms.maps.util.LogM;
import com.huawei.hms.maps.util.AssetBitmapDescriptor;
I tried several solutions, but none of them worked. Can someone help?
To resolve the issues on your Android app when using Huawei Map SDK 5.0.1 or above, you need to do the followings:
use Android API android.util.Log to replace com.huawei.hms.maps.util.LogM
for com.huawei.hms.maps.util.AssetBitmapDescriptor, use the corresponding method in BitmapDescriptorFactory to replace it. Please refer to the links for details:
Link 1 and link2.

How do you build iOS specific packages using SPM?

I am using Swift Package Manager that doesn't having a xcodeproject file associated with it and I get an error when building through he terminal. When I call the swift build command I get an error that the MacOS build failed. The package I'm building doesn't support MacOS (It uses UIKit), but only iOS. I can't figure out a way to call the command to only specify that the build is targeted for iOS. I've Google searched around with no luck. Does anybody know the correct syntax if it exists to build an SPM package for iOS from the terminal?
The version of Swift I'm using is: "Apple Swift version 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)"
I have specified the platform in the Package.swift file
let package = Package(
name: "Package",
platforms: [.iOS(.v10), ],
products: [
...
I have created a sample project on github https://github.com/mike011/Swift-Package-Manager-Example. When I run swift build it fails with
/git/Swift-Package-Manager-Example/Sources/Swift-Package-Manager-Example/iOSSpecificFile.swift:9:8: error: no such module 'UIKit'
import UIKit
^
/git/Swift-Package-Manager-Example/Sources/Swift-Package-Manager-Example/iOSSpecificFile.swift:9:8: error: no such module 'UIKit'
import UIKit
^
I "solved" this by wrapping all my files in #if !os(macOS) #endif blocks. So the package builds on a Mac, but it doesn't have any content.
SwiftPM doesn't currently have a way to disallow building for a specific platform but if you want you can take advantage of the minimum build version to cause compile time errors on platforms you don't support.
For example if you don't want to allow building on macOS you can use the platform version: .macOS("99.0") in your platforms section of your manifest and you will be given the compilation warnings and errors similar to this when building in Xcode:
The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 99.0, but the range of supported deployment target versions is 10.8 to 10.16.99
Invalid Darwin version number: macos99.0
Invalid version number in 'target x86_64-apple-macos99.0'

ionic storage module giving OpaqueToken error with angular 5

I have updated my ionic project to angular 5 and i got the below error with many ionic native plugins..
angular/core/core"' has no exported member 'OpaqueToken
Resolved all of the issues after updating to the latest version , except for ionic-storage.
Still its giving this error
node_modules/#ionic/storage/es2015/storage.d.ts import { OpaqueToken }
from '#angular/core';
node_modules/#angular/core/core"' has no exported member 'OpaqueToken'.
We can see one open issue #github (142) but no fix or workaround found.
You can solve this issue by upgrading #ionic/storage to version 2.1.2 or higher.
Update (context):
OpaqueToken was removed in Angular v5 (it's been deprecated since
Angular v4). The corresponding change in the #ionic/storage package was done in this change as part of the 2.1.2 update.