Missing dependency: ionic-angular when trying to use ionic-stepper - ionic-framework

I want to use ionic-stepper in my project.
I downloaded this package from https://www.npmjs.com/package/ionic-stepper. When I use it, I get the following error:
ERROR in The target entry-point "ionic-stepper" has missing dependencies:
[ng] - ionic-angular
What does this mean, and how can I fix it?

The error message is pretty clear. You're missing ionic-angular:
ERROR in The target entry-point "ionic-stepper" has missing dependencies:
[ng] - ionic-angular
ionic-angular is listed as a dependency, so you'll need to get a copy if you want to use ionic-stepper.
Here is the cause of your problem:
I downloaded this package...
Manually downloading files isn't the recommended way to install libraries from NPM.
Instead, use Yarn or the NPM CLI tool to install it. These tools will automatically identify and install dependent packages, like ionic-angular:
yarn add ionic-stepper

Related

The target entry-point "#ionic-native/media-capture" has missing dependencies: - #ionic-native/core

When I try to build my ionic mobile app on android I get the following error.
An error occurred during the build:
Error: The target entry-point "#ionic-native/media-capture" has missing dependencies:
- #ionic-native/core
at TargetedEntryPointFinder.findEntryPoints (/Users/prabhashibuddhima/Documents/Personal/Projects/VRec/myVideo/node_modules/#angular/compiler-cli/ngcc/src/entry_point_finder/targeted_entry_point_finder.js:40:23)
at /Users/prabhashibuddhima/Documents/Personal/Projects/VRec/myVideo/node_modules/#angular/compiler-cli/ngcc/src/execution/analyze_entry_points.js:28:41
at SingleProcessExecutorSync.SingleProcessorExecutorBase.doExecute (/Users/prabhashibuddhima/Documents/Personal/Projects/VRec/myVideo/node_modules/#angular/compiler-cli/ngcc/src/execution/single_process_executor.js:28:29)
at /Users/prabhashibuddhima/Documents/Personal/Projects/VRec/myVideo/node_modules/#angular/compiler-cli/ngcc/src/execution/single_process_executor.js:57:59
at SyncLocker.lock (/Users/prabhashibuddhima/Documents/Personal/Projects/VRec/myVideo/node_modules/#angular/compiler-cli/ngcc/src/locking/sync_locker.js:34:24)
at SingleProcessExecutorSync.execute (/Users/prabhashibuddhima/Documents/Personal/Projects/VRec/myVideo/node_modules/#angular/compiler-cli/ngcc/src/execution/single_process_executor.js:57:27)
at Object.mainNgcc (/Users/prabhashibuddhima/Documents/Personal/Projects/VRec/myVideo/node_modules/#angular/compiler-cli/ngcc/src/main.js:74:25)
at Object.process (/Users/prabhashibuddhima/Documents/Personal/Projects/VRec/myVideo/node_modules/#angular/compiler-cli/ngcc/index.js:29:23)
at NgccProcessor.processModule (/Users/prabhashibuddhima/Documents/Personal/Projects/VRec/myVideo/node_modules/#ngtools/webpack/src/ngcc_processor.js:163:16)
at /Users/prabhashibuddhima/Documents/Personal/Projects/VRec/myVideo/node_modules/#ngtools/webpack/src/ivy/host.js:55:18
at /Users/prabhashibuddhima/Documents/Personal/Projects/VRec/myVideo/node_modules/#ngtools/webpack/src/ivy/host.js:47:24
at Array.map (<anonymous>)
at Object.host.resolveModuleNames (/Users/prabhashibuddhima/Documents/Personal/Projects/VRec/myVideo/node_modules/#ngtools/webpack/src/ivy/host.js:45:32)
at actualResolveModuleNamesWorker (/Users/prabhashibuddhima/Documents/Personal/Projects/VRec/myVideo/node_modules/typescript/lib/typescript.js:102904:133)
at resolveModuleNamesWorker (/Users/prabhashibuddhima/Documents/Personal/Projects/VRec/myVideo/node_modules/typescript/lib/typescript.js:103126:26)
at resolveModuleNamesReusingOldState (/Users/prabhashibuddhima/Documents/Personal/Projects/VRec/myVideo/node_modules/typescript/lib/typescript.js:103200:24)
An unhandled exception occurred: The target entry-point "#ionic-native/media-capture" has missing dependencies:
- #ionic-native/core
See "/private/var/folders/vp/8s5chkws6tx5v3wjyvr7n_qm0000gn/T/ng-HBL1kz/angular-errors.log" for further details.
I’m getting this error not only with the media-capture plugin. With Image-picker, file plugins also I’m getting the same error. I tried recreating the project, removing platforms and plugins and adding them again, npm install and all.
Please help me to solve this
It seems that you miss the #ionic-native/core dependency.
You need to run npm install --save #ionic-native/core to install it.
If the problem persists, try to delete the node_modules folder, and run npm install again.
the error means that you have installed #ionic-native/media-capture but it is lacking #ionic-native/core dependence which you need to install
by running this command:
npm i #ionic-native/core --save

How to Create Custom SplashScreen on Ionic?

I want show custom splash screen with animation. I tried add LottieSplashScreen plugin but i can't do this.
Tried with this code
cordova plugin add cordova-plugin-lottie-splashscreen
But i facing
'sh' is not recognized as an internal or external command,
operable program or batch file.
Failed to install 'cordova-plugin-lottie-splashscreen': Error: Hook failed with error code ENOENT: C:\Users\bbara\Desktop\GuvercinSepetim\plugins\cordova-plugin-lottie-splashscreen\hooks\ios\update_pod_repo.sh
at C:\Users\bbara\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:224:23
at _rejected (C:\Users\bbara\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:864:24)
at C:\Users\bbara\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:890:30
at Promise.when (C:\Users\bbara\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:1142:31)
at Promise.promise.promiseDispatch (C:\Users\bbara\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:808:41)
at C:\Users\bbara\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:624:44
at runSingle (C:\Users\bbara\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:137:13)
at flush (C:\Users\bbara\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:125:13)
at processTicksAndRejections (internal/process/next_tick.js:74:9)
Hook failed with error code ENOENT: C:\Users\bbara\Desktop\GuvercinSepetim\plugins\cordova-plugin-lottie-splashscreen\hooks\ios\update_pod_repo.sh
You are running a cordova node but not ionic cordova:
cordova plugin add cordova-plugin-lottie-splashscreen
According to ionic documentation:
npm install #ionic-native/lottie-splash-screen
ionic cordova plugin add cordova-plugin-lottie-splashscreen
And here is the referance:
https://ionicframework.com/docs/native/lottie-splash-screen
And here is the github reposatory of the plugin :
https://github.com/timbru31/cordova-plugin-lottie-splashscreen
Try looking into Capacitor instead of Cordova. You can still use all your Cordova libraries, but the Capacitor build is a bit cleaner. I followed this tutorial and found it very useful with good tools. It worked for me first time, which is never the case with some Ionic stuff!
https://enappd.com/blog/icon-splash-in-ionic-react-capacitor-apps/114/
The issue you are describing was fixed in the v0.8.1 release. It originated from preparing/building the iOS platform on a Windows machine - which won't work anyways. Because cordova-ios supports recent Pod installations out of the box, it's no longer required to sync the repo, i.e, the hook is obsolete. However, the lottie plugin won't fail anymore.
Side note: I'm the author of this plugin.

How to fix Cannot find module 'rxjs-compat/Observable' error?

I am creating an ionic app with Ionic 4 based on angular 6!
To set the screen orientation installed the below plugin.
ionic cordova plugin add cordova-plugin-screen-orientation
npm install --save #ionic-native/screen-orientation
And imported in required typescript! But when i run the project i got the error below.
ERROR in node_modules/#ionic-native/screen-orientation/index.d.ts(2,10): error TS2305: Module '"/Users/karthikcp/Documents/IONIC/myBake/node_modules/rxjs/Observable"' has no exported member 'Observable'.
[ng] node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.
Can anyone help me in fixing this error?
In Ionic 4 you need to install all your native plugins as beta:
npm install --save #ionic-native/screen-orientation#beta
Inside your code, for Angular, the import path should end with /ngx.
import { ScreenOrientation } from '#ionic-native/screen-orientation/ngx';
Don't install rxjs-compact.
npm i rxjs-compat
Please add these command on your root folder

IONIC Package Failed to install ‘onesignal-cordova-plugin’: Error: pod: Command failed with exit code 31

I’m trying to use ionic pro packaging (https://ionicframework.com/pro/package). When building to android everything works fine. But building to IOS gives me this error:
Looking for related GitHub issues on fastlane/fastlane…
\e[91mFailed to upload ipa to storage please retry your build.\e[0m
MAC Iteration 1
MAC verified OK
PKCS7 Encrypted data: pbeWithSHA1And40BitRC2-CBC, Iteration 2048
Certificate bag
PKCS7 Data
Shrouded Keybag: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048
/Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane_core/lib/fastlane_core/ui/interface.rb:145:in `shell_error!’: [!] Exit status of command ‘cordova platform add ios --nofetch’ was 1 instead of 0. (FastlaneCore::Interface::FastlaneShellError)
Adding ios project…
Creating Cordova project for the iOS platform:
Path: platforms/ios
Package: com.notified.x
Name: Notified
iOS project created with cordova-ios#4.5.4
Discovered plugin “cordova-plugin-whitelist” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-whitelist#^1.3.3” via npm
Installing “cordova-plugin-whitelist” for ios
Adding cordova-plugin-whitelist to package.json
Saved plugin info for “cordova-plugin-whitelist” to config.xml
Discovered plugin “cordova-plugin-device” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-device#^2.0.2” via npm
Installing “cordova-plugin-device” for ios
Adding cordova-plugin-device to package.json
Saved plugin info for “cordova-plugin-device” to config.xml
Discovered plugin “cordova-plugin-splashscreen” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-splashscreen#^5.0.2” via npm
Installing “cordova-plugin-splashscreen” for ios
Adding cordova-plugin-splashscreen to package.json
Saved plugin info for “cordova-plugin-splashscreen” to config.xml
Discovered plugin “cordova-plugin-ionic-webview” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-ionic-webview#^1.2.1” via npm
Installing “cordova-plugin-ionic-webview” for ios
Adding cordova-plugin-ionic-webview to package.json
Saved plugin info for “cordova-plugin-ionic-webview” to config.xml
Discovered plugin “cordova-plugin-ionic-keyboard” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-ionic-keyboard#^2.1.2” via npm
Installing “cordova-plugin-ionic-keyboard” for ios
Adding cordova-plugin-ionic-keyboard to package.json
Saved plugin info for “cordova-plugin-ionic-keyboard” to config.xml
Discovered plugin “cordova-plugin-app-name” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-app-name#^1.0.4” via npm
Installing “cordova-plugin-app-name” for ios
Adding cordova-plugin-app-name to package.json
Saved plugin info for “cordova-plugin-app-name” to config.xml
Discovered plugin “cordova-plugin-inappbrowser” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-inappbrowser#^3.0.0” via npm
Installing “cordova-plugin-inappbrowser” for ios
Adding cordova-plugin-inappbrowser to package.json
Saved plugin info for “cordova-plugin-inappbrowser” to config.xml
Discovered plugin “cordova-plugin-statusbar” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-statusbar#^2.4.2” via npm
Installing “cordova-plugin-statusbar” for ios
Adding cordova-plugin-statusbar to package.json
Saved plugin info for “cordova-plugin-statusbar” to config.xml
Discovered plugin “cordova-plugin-ionic” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-ionic#^4.1.7” via npm
Installing “cordova-plugin-ionic” for ios
Plugin dependency “cordova-plugin-splashscreen#5.0.2” already fetched, using that version.
Dependent plugin “cordova-plugin-splashscreen” already installed on ios.
Adding cordova-plugin-ionic to package.json
Saved plugin info for “cordova-plugin-ionic” to config.xml
Discovered plugin “cordova-plugin-cocoapod-support” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-cocoapod-support#^1.5.0” via npm
Installing “cordova-plugin-cocoapod-support” for ios
Adding cordova-plugin-cocoapod-support to package.json
Saved plugin info for “cordova-plugin-cocoapod-support” to config.xml
Discovered plugin “onesignal-cordova-plugin” in config.xml. Adding it to the project
Fetching plugin “onesignal-cordova-plugin#^2.1.0” via npm
Installing “onesignal-cordova-plugin” for ios
Failed to install ‘onesignal-cordova-plugin’: Error: pod: Command failed with exit code 31
at ChildProcess.whenDone (/Users/ionic/builds/TechNotified/notified-mobile-app/platforms/ios/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
Failed to restore plugin “onesignal-cordova-plugin” from config.xml. You might need to try adding it again. Error: Error: pod: Command failed with exit code 31
Searching for new pods
Checking config.xml for pods.
Installing pods
Sit back and relax this could take a while.
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 0 dependencies from the Podfile and 0 total pods installed.
[!] The Podfile does not contain any dependencies.
Updating ios build to use workspace.
Adding schemes
–save flag or autosave detected
Saving ios#~4.5.4 into config.xml file …
I’ve installed cocoa pods but that didn’t help.
A lot of threads tells me to do this: “Run pod repo update first. I had the same issue and it helped.” but that is only possible on OS X i think?
I have spent almost a day on this thing now. As usual the ionic documentation only says something like “Click the build button and it’s all done”. https://ionicframework.com/docs/pro/package/
I solved it by doing this steps: Package native binaries Failed to install 'onesignal-cordova-plugin' then i still got the same error and noticed it said version "^2.1.0" instead of just "2.1.0" on the onesignal-cordova-plugin error line. So i found that it still had the "^" in the version number in both the config.xml and the package.json file. When i removed both it worked!

angular4 data table Error as ./node_modules/angular-4-data-table/src/index.ts

Im getting error as after i install datatabel npm install angular-4-data-table --save
ERROR in ./node_modules/angular-4-data-table/src/index.ts
Module build failed: Error: C:\SOFT\Angular\Angular\node_modules\angular-4-data-table\src\index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
You are certenly using a higher version of angular which is not well organised with angular-data-table4 then upgrade for 5 version of the grid :
npm install angular5-data-table --save
and in App Module use:
import {DataTableModule} from 'angular5-data-table';
use in component
import { ... } from 'angular5-data-table';
it worked for me