React toastify not properly running when spinning up storybook? - react-toastify

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)

Related

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

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

Unity showing this error - Assets\Plugins\GitHub\Editor\UnityAPIWrapper.cs: error CS0103: The name 'UnityShim' does not exist in the current context

I am using Unity 2019.2.2f1 and my project was built a long time with Unity 2017,2018. Now it is showing this error which is not resolving.
This error is due to ARCore and some basic packages.
Steps to resolve:
Import ARCore SDK again.(Assets >> Import Packages >> Custom Packages)
Use Window > Package Manager to install the "Multiplayer HLAPI" and "XR Legacy Input Helpers" packages. If it was already installed try removing and then reinstalling it again.

cannot import path_provider package

I'm building new flutter app, I've downloaded the last version of path_provider package, but when I try to import it using the import statement form the docs
import 'package:path_provider/path_provider.dart';
It didn't work, it says this package doesn't exist, instead I can import things like
import 'package:path_provider_linux/path_provider_linux.dart';
which doens't have the functionality I want.
Can you build the application?
Are you deploying to mobile or MacOS?
Try to run a fresh release configuration, and if it works, then reboot your IDE.
Then run the command that Confidence Yobo suggested, to redownload the packages via yaml.
Also make sure that your yaml file is formatted correctly. Once a pubspec GET command has finished running and the lock is released, normally if there is an error it will show up on your output window.
Also make sure to get the latest package: path_provider: ^1.6.18

Electron run by Capacitor in Ionic 5: console logging and live reload not working

I've used Electron standalone before, and console.log() commands in main.js worked just fine (output to IDE console) and the electron-reload module also worked fine when content changes were detected in the Electron root folder.
I've now started a new Ionic 5 project, and added Electron to the project via Capacitor. Capacitor makes a few necessary changes to Electron (e.g. renaming main.js to index.js etc), I've now also have to start electron via capacitor npx cap open electron.
In doing so, console.log() commands in index.js are now NOT being output to the IDE console, errors are not being output to console, and the electron-reload module now serves a blank page when changes are detected… the only console output that I get is:
$ npx cap open electron
[info] Opening Electron project at ...
Is this a capacitor limitation or what configurations must be done to make this work ?
#ionic/cli#6.10.0
#capacitor/core#2.2.0
electron#8.3.1
also updated electron to latest 9.0.4 - same result.
here are steps to reproduce this:
# install ionic CLI
$ npm install -g #ionic/cli
# create project w/ capacitor
$ ionic start <project name> blank --type=angular --capacitor
# create initial build, needed by cap for electron
$ cd <ionic_project_folder>
$ ionic build
# add electron via cap
$ npx cap add electron
# run electron
$ npx cap open electron
if you enter console.log messages in electron’s index.js, none of them will be logged…
figured it out. Capacitor blocks all log messages by default, but you can run npm run electron:start from within the /electron folder and you'll get all log messages... HTH someone.

can't build with Ionic2

I'm developing an Ionic2 application and now I want to make a build but I get an error.
ionic info returns this:
Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.1
Ionic App Lib Version: 2.1.1
Ionic App Scripts Version: 0.0.36
OS: Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS
Node Version: v4.2.6
my main.prod.ts looks like this:
import { platformBrowser } from '#angular/platform-browser';
import { enableProdMode } from '#angular/core';
import { AppModuleNgFactory } from './app.module.ngfactory';
enableProdMode();
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);
Everytime I try to do ionic build android I get this:
bundle failed: Could not resolve './app.module.ngfactory' from /home/xxx/Desktop/myApp/.tmp/app/main.prod.ts
ionic-app-script task: "build"
Ionic2 uses the Ahead-Of-Time-Compilation of Angular2 (by using ngc). What ngc does, is creating a factory out of your normal app-module and renames this module by adding NgFactory to the modules' Name.
So for example if you have an app-module called MySuperAwesomeApp, ngc creates a file which exports a factory called MySuperAwesomeAppNgFactory. And when building your Android app, ionic will search for MySuperAwesomeAppNgFactory instead of MySuperAwesomeApp, thus throwing an error, when not finding it.
In your case I suppose that you renamed your app-module (located in ./app.module.ts) but didn't change the factory name in the main.prod.ts.
For further reading on AOT, please refer to the Angular2 AOT Doc.