Error while installing ionic capacitor printer plugin - ionic-framework

I am using this printer package with capacitor and I have installed it in my project. But when i try serve my ionic project its throwing an error of module not found
https://ionicframework.com/docs/native/printer
ERROR in /.../node_modules/#awesome-cordova-plugins/printer/ngx/index.js
Module not found: Error: Can't resolve '#awesome-cordova-plugins/core' in '/.../node_modules/#awesome-cordova-plugins/printer/ngx'

Make sure to install the core plugin before utilising,
npm install #awesome-cordova-plugins/core --save

Related

Ionic and cordova(Latest versions) installation problems

I'm trying to install the Ionic framework with npm. It successfully installed. But when I try installing new versions of Ionic and Cordova, I was unable to install and Error messages are coming frequently in the ubuntu terminal.
I had a same problem but i recovered it using following command:
npm install -g cordova ionic --verbos
if its not work then you need to try yarn. you can download and install form https://yarnpkg.com/lang/en/docs/install/ this website
After install, run the following command
yarn add global cordova
yarn add global ionic

Ionic App Version

I can't install ionic native App Version.
When I write "ionic cordova plugin add cordova-plugin-app-version" shows next message:
How can I fix it??
λ ionic cordova plugin add cordova-plugin-app-version
> cordova plugin add cordova-plugin-app-version --save
× Running command - failed!
[ERROR] An error occurred while running cordova plugin add cordova-plugin-app-version --save (exit code 1):
Error: Failed to fetch plugin cordova-plugin-app-version via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963229 Error output:
npm ERR! path C:\Users\Xu\Documents\github\rheumaiq_app\node_modules\es6-promise-plugin\package.json
npm ERR! code ELOOP
npm ERR! errno -4067
npm ERR! syscall open
npm ERR! ELOOP: too many symbolic links encountered, open
'C:\Users\Xu\Documents\github\rheumaiq_app\node_modules\es6-promise-plugin\package.json'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Xu\AppData\Roaming\npm-cache\_logs\2017-10-18T14_44_39_797Z-debug.log
UPDATE:
Thanks a lot!!
But the problem is not App Version, is with es6-promise-plugin in node_modules.
package.json
...
"es6-promise-plugin": "file:node_modules/es6-promise-plugin",
...
this folder is empty, I dont know what I have to do.
You have a typo
Here is how it should be
cordova plugin add cordova-plugin-appversion
Your mistake most likely results from the github repo being
https://github.com/Rareloop/cordova-plugin-app-version
But npm version name differs from the git repo name.
You can try cordovas --nofetch option to work around problems like this since cordova 7.0.0:
cordova plugin add cordova-plugin-appversion --nofetch
See the release notes for cordova 7.0.0 here to read more about the --nofetch mode.
The problem is not that it is empty, the problem is that it is a symbolic link that points to itself and therefore does not work. A loop is created.
If you delete the folder node_modules/es6-promise-plugin you will see that it is created again each time you type npm install...
I have seen this efect occurs adding the android platform, when try to do it for the cordova-plugin-x-socialsharing plugin, with the 5.2.1 version.
With the v5.2.0 that does not happen.
You can change your version:
ionic cordova plugin remove cordova-plugin-x-socialsharing --force
ionic cordova plugin add cordova-plugin-x-socialsharing#5.2.0 --force
Or you can change in your package.json the version to use.

How do I fix an error: Unknown plugin "flow-react-proptypes" in react native?

I'm trying to use https://github.com/jacklam718/react-native-action-sheet-component in a react-native project and am getting the following runtime error
Unknown plugin "flow-react-proptypes" specified in
"node_modules/react-native-action-sheet-component/.babelrc.env.development
I tried yarn add babel-plugin-flow-react-proptypes -D but that didn't seem to fix it.
React-native version 0.41.2, iOS
Im not familiar with yarn but from that repo packaje.json we can see that babel-plugin-flow-react-proptypes is listed as devDependency so it won't get installed when installing the package from npm.
Try installing it in your node_modules folder (if that's not what you already did with yarn) or go into node_modules/react-native... And execute npm install.

Plugin error while building ionic app

during build ionic app, this error is shown:
Error occurred during command execution from a CLI plugin (#ionic/cli-plugin-cordova). Your plugins
may be out of date.
TypeError: env.runcmd is not a function
This error message indicates that the Ionic CLI version is incompatible with other CLI plugins (see https://github.com/ionic-team/ionic/issues/12561).
Please run the following commands in your project directory (where you package.json is):
npm i -g ionic#latest
npm i --save-dev --save-exact ionic#latest
This will install the latest Ionic CLI version (currently 3.7.0) globally and locally. After that the error should no longer occur.
If you have ionic cli version lower than 3.6.0 try to update it. It resolved the issue for me.

Error while installing any plugin

I am using the latest version of Ionic and just getting started with the Ionic Framework. I am trying to add plugins to my projects but always I gets error something like as shown in image. I have checked my internet connection and tried to install some other plugins also but I get the same error always.
Try uninstalling cordova
npm uninstall cordova -g
and installing latest version
npm install -g cordova