I've already used the native spinner in some older projects before and it's worked fine. However, I recently started a new IONIC's project (V.3.5.3) and It's not working properly or I'm doing something wrong. I also noticed that Ionic's Team has changed its Native Spinner Plugin recently, but I don't think that's the problem.
Every time I call show funcion:
this.spinnerDialog.show()
It returns:
WARN: Native: tried calling SpinnerDialog.show, but the SpinnerDialog plugin is not installed.
WARN: Install the SpinnerDialog plugin: 'ionic plugin add cordova-plugin-native-spinner'
And yes, the plugin is already included in app.module.ts in providers part.
And yes, the commands to include the plugin were executed:
ionic cordova plugin add cordova-plugin-native-spinner
npm install --save #ionic-native/spinner-dialog
Could anyone help me please?
It's a bug, do this while we wait for the fix:
edit
project/node_modules/#ionic_native/spinner-dialog/index.js
Change line 84 to this
pluginRef: 'SpinnerDialog'
It's a temp fix that will work.
Related
I am building a custom capacitor plugin with:
npm init #capacitor/plugin
This creates my plugin but following the directions it says to run:
npx cap sync
But I get this error: npm ERR! could not determine executable to run
I'm just adding this info as I'm not sure if it affects anything...
So I created my Java class in Android studio (AS) to extend capacitor-push-notifications. All this works in AS but I wanted to create a plugin so if something happens to the android folder I can rely on my plugin to add the Java files.
I import the file (in Java):
import com.capacitorjs.plugins.pushnotifications.PushNotificationsPlugin
My question is: How do I import the capacitor-push-notifications when I am in VS Code? I get the following error when I run npm run verify:android:
Could not find com.capacitorjs.plugins.pushnotifications:pushnotifications:1.0.9.
Required by:
project :
also, I did install the plugin:
npm i #capacitor/push-notifications
also added this to build.gradle under dependancies:
implementation "com.capacitorjs.plugins.pushnotifications:pushnotifications:1.0.9"
So do I just ignore the error as I know it works in AS? I looked everywhere and cannot find any reference to this.
I am new to Node.js development and I have installed WebStorm from JetBrains to use it as my JavaScript IDE.
So I am following a tutorial in Udemy and I have come to notice the following problem.
I installed some modules with npm from WebStorm Console and although my JS script is working as intended, WebStorm autocompletion for the npm modules is not working.
Coding assistance for Node.js in my settings is marked! What do I do wrong?
The problems occur because of the weird way properties are defined.
For example, in chalk package they are generated dynamically using Object.defineProperty(this, styleName, {value: builder});, where the styleName is a color name you use in your code. There is no way to resolve them when analyzing file statically.
Normally installing Typescript stubs can be used as a workaround. But this doesn't work for validator due to WEB-43528.
chulk typings are included in package distribution, but not resolved because the required fields in package.json are missing. As a workaround, open node_modules/chalk/package.json and add "types": "index.d.ts", to it:
this should help:
I installed plugin for Intellij-Idea and it doesn`t work. Why can it be? As you can see the require word doesn`t become yellow.
And here is my plugin installed:
Please make sure to enable Node.js Core library in File | Settings | Languages & Frameworks | Node.js and NPM
I like to hover over things that are underlined to give me clues as to where to start. Your "path" and "require" are underlined. Your errors might say Unused local variable 'path' and Unresolved method or function require()
You might not have installed node in the current project. If you don't have node installed, try:
npm init to create a package.json file.
IntelliJ will walk you through creating the file. You can just press enter all the way through if you want and edit it later.
npm install express --save (replace express with whatever library you are trying to use) to save library in the dependencies list
Installing express
How can I fix WebStorm warning “Unresolved function or method” for “require”
I just did an npm update on my Aurelia CLI project, and now I'm suddenly getting Toast notifications from Gulp for TypeScript compilation errors in Visual Studio 2015, which is really, really annoying.
Can anyone provide guidance on how to switch this off? Also, does anyone know of any recent changes to Node packages that would cause this behaviour to start happening?
The compilation is disabled by opening the .csproj file for the project and add the following line, right after the TypeScriptToolsVersion element:
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
UPDATE:
In RC2, you can disable it by adding TypeScriptCompileBlocked to the .xproj file.
<PropertyGroup>
<TypeScriptCompileBlocked>True</TypeScriptCompileBlocked>
</PropertyGroup>
To remove this you would want to modify your transpile.js file to remove gulp notify - you would do this here:
https://github.com/aurelia/cli/blob/3c5ea5f935e523d1cec5ead884391d6b008deee5/lib/resources/tasks/transpile.js#L22
If someone is coming later to look for the same thing from a skeleton it is here in build/tasks/build.js -
https://github.com/aurelia/skeleton-navigation/blob/master/skeleton-typescript/build/tasks/build.js#L26
I remove this on my TypeScript problems because it emits too many issues when refactoring code.
I am going to create the app that shows google map and required social login with facebook.
I decided to use:
https://github.com/Wizcorp/phonegap-facebook-plugin
and
https://github.com/wf9a5m75/phonegap-googlemaps-plugin
I don't know what is a reason, but these plugins perfectly work alone, but when I installed them together I got next error:
BUILD FAILED
C:\Users\{USER_NAME}\AppData\Local\Android\sdk\tools\ant\build.xml:577: Jar mismatch! Fix your dependencies
Total time: 1 second
{APP_PATH}\platforms\android\cordova\node_modules\q\q.js: 126
throw e;
^
Error code 1 for command: cmd with args: /s /c "ant debug -f {APP_PATH}\platforms\android\build.xml -Dout.dir=ant-build -Dgen.absolute.dir=ant-gen"
ERROR running one or more of the platforms: Error: {APP_PATH}\platforms\android\cordova\run.bat: Command failed with exit code 8
You may not have the required environment or OS to run this project
I am not experienced in PhoneGap development, but I guess that both plugins are doing some changes in platform dependencies (and rewriting changes of another plugin).
Could anybody help me with this?
I got the answer of google-maps plugin creator:
The facebook plugin contains android-support-v4.jar, and the map
plugin installs another android-support-v4.jar.
Remove one of them.
I took off android-support-v4.jar from com.phonegap.plugins.facebookconnect folder and left it in libs folder. It was solved my issue (fb and g-maps work together).
So I can mark this question as closed now.
I leave this answer for anybody who meets this issue like me.