Same here. But fixed installing the required plugins. In my case, ionic-cli updated on-demand (it notified me that there were new plugin versions) some plugins that were causing this issue, since yesterday ionic@3.4.0 was released (not migration docs in changelog yet) and it needs some new plugins and updates. I realized that with the --verbose command:
$ ionic serve --verbose
[DEBUG] Loading global plugin @ionic/cli-plugin-proxy
[DEBUG] Throwing PLUGIN_NOT_INSTALLED for global @ionic/cli-plugin-proxy
[DEBUG] Loading local plugin @ionic/cli-plugin-cordova
[DEBUG] Throwing PLUGIN_NOT_INSTALLED for local @ionic/cli-plugin-cordova
[DEBUG] Loading local plugin @ionic/cli-plugin-ionic-angular
[DEBUG] Throwing PLUGIN_NOT_INSTALLED for local @ionic/cli-plugin-ionic-angular
[ERROR] Error occurred while loading plugins. CLI functionality may be limited.
Checking for CLI updates now...
[DEBUG] Plugin error: PLUGIN_NOT_INSTALLED
[DEBUG] Getting plugin info for ionic
[DEBUG] Checking for latest plugin version of ionic@latest.
PLUGIN_NOT_INSTALLED
[DEBUG] Latest version of ionic@latest is 3.4.0.
[ERROR] No updates found after plugin error--please report this issue.
module.js:472
throw err;
^
Error: Cannot find module '@ionic/cli-utils'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/var/www/imaat/mob/clients/museos-infinitos/node_modules/ionic/dist/index.js:14:21)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
It’s working now with ionic@3.4.0
I’m waiting for official changelog to update my package.json
Ionic CLI (which released 3.4.0 yesterday) is not Ionic (which is still on 3.3.0 right now).
From the commands you executed you now have a dependency on Ionic CLI (ionic) in your project that is not required at all as Ionic CLI has to be installed globally. Also you probably don’t need the cli-plugin-proxy.
Thanks for your clarification. I’m installing Ionic locally in all my projects because I’m using it since it was a beta and new Ionic versions doesn’t work well with old versions, specially betas. There are some old components conflicting as well because of dependencies, so instead of making a refactor every time I need to apply some client’s request, I prefer installing Ionic and Cordova locally and use always that “static” version to compile.
Regarding this issue I came up with this morning, with cli asking me to install 2 new component versions and then failing to run with the errors described as below, what would be the best approach to take?
I don’t think this is actually possible or working - ionic is an executable that has to be installed globally afaik. Do you get different results on ionic version in different directories?
Revert to the state before, uninstall everything cli-related globally and in the project, reinstall Ionic CLI globally, then run it in the project directory and let it add the needed plugins back by itself. It is pretty good at that now.[quote=“imaatLuciano, post:29, topic:89570”]
Sorry @Sujan12 but my package.json now says “ionic”: “^3.4.0”. This is ionic-cli version? So ionic-angular is the Ionic version?
[/quote]
Exactly. ionic is Ionic CLI and shouldn’t be in package.json at all (see above) and ionic-angular is Ionic Framework.
I don’t think this is actually possible or working - ionic is an executable that has to be installed globally afaik. Do you get different results on ionic version in different directories?
Yes, because I’m executing from node_modules/.bin in my env path (I’ve modified my .bashrc) and making bash not to store in cache the last executable path, so it will allways search in node_modules first if present.
...
export NODE_LOCAL="./node_modules/.bin"
export PATH=...:${NODE_LOCAL}:$PATH
set +h
Is there some limitation on using it the way I’m doing? I mean, I’m working like this and it’s working perfect in every app I have.
Wow, no, I just didn’t know this was possible! I actually like it.
One problem will be that the CLI is not built to handle this and, as you can see, wants to install some plugins globally as well by default. You probably worked around that by manually installing it, but this may well be the cause for your error.
Yep, you are right. I wish Ionic cli would be able to check the working directory (like a simple which ionic) so it would add the “-g” param to the update URL. BTW as a programmer, I know it might be not so simple and there are not a lot of people doing the same. Maybe some flag in project’s local config or ~/.ionic/ …
Just saying…