'Autocomplete' was not found in '#material-ui/core' with version ^4.11.2 - material-ui

I Followed the lab version link for Autocomplete, according to warning it should be there in the core with version 4.11.2, but it looks like it's still not available

you have to import lab for Autocomplete component.
autocomplete component documentation
To install lab you can use the following:
// with npm
npm install #material-ui/lab
// with yarn
yarn add #material-ui/lab
material ui lab

Related

How do I install a ionic plugin from the github repository?

The npm install docs explains how to install a dependency from the github source code rather than using the npm registry.
It works well when your project isn't scoped, so that if I wanna install express I can just execute:
npm install https://github.com/expressjs/express
and it works well.
In the ionic plugin case, though, this doesn't work correctly.
Ionic plugins are scoped, if I want to install the speech recognition plugin from the npm registry I can just execute:
npm install #ionic-native/speech-recognition
ThisĀ is the #ionic-native/speech-recognition npm page.
On the right sidebar there's the link to the corresponding github page, which is https://github.com/ionic-team/ionic-native.
If I try to execute:
npm i https://github.com/ionic-team/ionic-native/speech-recognition
It installs only the #ionic-native dependency rather than the plugin.
The same about:
npm i #ionic-native/speech-recognition#https://github.com/ionic-team/ionic-native
In both cases, the output is:
#ionic-native/speech-recognition#https://github.com/ionic-team/ionic-native
npm WARN #ionic-native/ionic-webview#5.28.0 requires a peer of
#ionic-native/core#^5.1.0 but none is installed. You must install peer
dependencies yourself. npm WARN uglifyjs-webpack-plugin#0.4.6 requires
a peer of webpack#^1.9 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3.0.0 but
none is installed. You must install peer dependencies yourself.
ionic-native#5.28.0 updated 1 package and audited 1602 packages in 38.072s
Which only adds the following row in the package.json:
"ionic-native": "git+https://github.com/ionic-team/ionic-native.git"
If you are asking why I need it, it's because I need to install a forked repo.
How can I install a ionic plugin from the github repository?
Thank you
Most of the plugins used by the Ionic Framework where created for Cordova/Phonegap way before Ionic was published. These are the main technologies that Ionic was built uppon, so you can find the information where and how to download the plugins from the Cordova and Phonegap Github pages or official website.
Speech Recognition for Cordova

Nx.dev doesn't show my newly created plugin

I'm trying to understand and use nx.dev dev tools
Basically what I'd like to do now is to create a custom plugin.
So I first installed the #nrwl/nx-plugin plugin which allows to build custom plugins.
Then I created a test plugin using the command:
nx g #nrwl/nx-plugin:plugin my-plugin
Done that, I built the plugin:
nx run my-plugin:build
Then I published to npm (my local npm repository of course, hosted via Verdaccio)
npm publish ./dist/libs/my-plugin --registry http://localhost:4873
Done that I installed my brand new plugin as you would do with any other nx plugin:
npm install -D #webtest/my-plugin --registry http://localhost:4873
Please note that #webtest is the name of my nx.dev workspace
The command is successful, but when I do:
nx list
I don't see it in the installed plugin list. All I get is:
NX Installed plugins:
#nrwl/cypress (builders,schematics)
#nrwl/jest (builders,schematics)
#nrwl/linter (builders)
#nrwl/node (builders,schematics)
#nrwl/nx-plugin (builders,schematics)
#nrwl/web (builders,schematics)
#nrwl/workspace (builders,schematics)
I would expect a #webtest/my-plugin on there. What am I missing here? Should the custom plugin appear in the installed plugin list?
It looks like there's a regression where only core and community plugins are listed when running nx list. This will be patched in 9.4.

What is the difference between plugins ion2-calendar and ionic2-calendar

I found both ion2-calendar and ionic2-calendar plugins in a same project
what is the difference between the two of them.
Also, I wish to know, these plugins are not listed by the command
ionic cordova plugin list
How to get the list of plugins installed other than cordova?
Below is the portion of package.json of that project.
"ion2-calendar": "^3.0.0-rc.0",
"ionic-angular": "^3.9.9",
"ionic2-calendar": "^0.5.7",
Found both are different
ion2-calendar is a plugin installed as below:
npm install ion2-calendar moment --save
Documentation :
https://www.npmjs.com/package/ion2-calendar
ionic2 calendar is a plugin installed as below:
npm install ionic2-calendar --save
Documentation:
http://www.codeexpertz.com/blog/mobile/ionic-2-calendar
both are having lot of different workaround
but both plugins are working in a same project without any clash.
This will help who are having some confusion about which one to be used.

Difference between "ionic cordova plugin add" and "npm install #ionic-native/plugin --save"

I have been trying to use the ionic-native plugins provided by Ionic 3. When I read the install instructions, there are always 2 command lines instead of one.
ionic cordova plugin add cordova-plugin-camera
npm install --save #ionic-native/camera
If my memory serves me right, only a single command similar to ionic plugin add somepluginhere will get the job done in the old days.
What are the differences here?
The difference is they are different packages.
ionic cordova plugin add
This command will download the cordova plugin - in this case, camera and set the config.xml , package.json, save in plugins folder and set it for each of your platforms.
Ionic leverages the cordova CLI to do this.
ionic-native
Ionic Native is simply a wrapper to the corresponding plugin.
npm install --save #ionic-native/camera
It installs the package #ionic-native/camera to your node-modules folder and sets that in package.json and nothing more.
This wrapper allows you to inject the corresponding cordova plugin as an Angular provider wherever you need instead of trying to declare the global variable and other workarounds.

How to compile and run an ES6 file with node when using babel6?

I installed the latest version 6 of babel, babel-core and babel-loader.
How can I run an ES6 file in Node with Babel6?
Previously I would run the command
babel-node server.js
but now I get this message:
The CLI has been moved into the package `babel-cli`. See http://babeljs.io/docs/usage/cli/.
None of the instructions on that page say how to do this.
The message could be clearer. You've installed the babel package and you should have installed the babel-cli package.
npm uninstall babel
npm install babel-cli
Upon installing babel-cli I also had to specify the es2015 loader and to specifically use my local babel-node package since I don't have it installed globally.
./node_modules/.bin/babel-node --presets es2015 server.js