Ionic-cli: Unable to find command - ionic serve after upgrade to 4.0.2 from 3.20.0

Created on 31 Jul 2018  路  18Comments  路  Source: ionic-team/ionic-cli

Description:
I just upgraded Ionic Cli from 3.20.0 to 4.0.2 and tried to run ionic serve and it shows error Unable to find command.

ionic info also does not work.

Please check image.

image

triage

Most helpful comment

I believe the solution is to uninstall fully and then re-install:

npm uninstall -g ionic
npm install -g ionic

All 18 comments

Same problem here, forced to downgrade Ionic CLI

Same problem here

You probably need to install it globally?

It was installed globally

Same here.

I believe the solution is to uninstall fully and then re-install:

npm uninstall -g ionic
npm install -g ionic

I got this if I trying to upgrade from 4.0.1

npm ERR! code ETARGET npm ERR! notarget No matching version found for @ionic/[email protected] npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist. npm ERR! notarget npm ERR! notarget It was specified as a dependency of 'ionic' npm ERR! notarget

when I removed it and download version 4.0.1 it is working fine so the problem related with 4.0.2 only

I've validated that the dependencies are correct for 4.0.2 release: https://unpkg.com/[email protected]/package.json

I'm guessing this is a local issue related to npm. Please make sure you are using either the latest npm 5 or 6, run npm cache clear, do a full uninstall and reinstall of ionic.

I have npm 6.2.0 and node 10.7.0 I did npm cache clear --force also I fully uninstall ionic and try to install the latest version and I got the same error

@aelshamy What is the output of npm info @ionic/[email protected] ?

@dwieeb nothing when I ran it

@aelshamy Are you using a custom registry? Your local npm cli is simply not acknowledging that 1.0.1 exists. 馃憠 https://www.npmjs.com/package/@ionic/cli-framework

@dwieeb oh yes I am using a custom one. let me switch to npm registry and check

@dwieeb after switching to npm registry, the installation goes well. thanks

Closing as duplicate of resolved issue: https://github.com/ionic-team/ionic-cli/issues/3393

If the issue is not resolved, please let me know and I will happily re-open!

(_) ___ _ __ (_) ___
| |/ _ | '_ | |/ __|
| | (_) | | | | | (__
|_|___/|_| |_|_|___| CLI 6.11.9

Usage:

$ ionic <command> [<args>] [--help] [--verbose] [--quiet] [--no-interactive] [--no-color] [--confirm] [options]

Global Commands:

completion ...................... (experimental) Enables tab-completion for Ionic CLI commands.
config <subcommand> ............. Manage CLI and project config values (subcommands: get, set, unset)
docs ............................ Open the Ionic documentation website
info ............................ Print project, system, and environment information
init ............................ (beta) Initialize existing projects with Ionic
login ........................... Log in to Ionic
logout .......................... Log out of Ionic
signup .......................... Create an Ionic account
ssh <subcommand> ................ Commands for configuring SSH keys (subcommands: add, delete, generate, list,
                                  setup, use)
start ........................... Create a new project

Project Commands:

build ........................... Build web assets and prepare your app for any platform targets
capacitor <subcommand> .......... Capacitor functionality (subcommands: add, build, copy, open, run, sync, update)
                                  (alias: cap)
cordova <subcommand> ............ Cordova functionality (subcommands: build, compile, emulate, platform, plugin,
                                  prepare, requirements, resources, run) (alias: cdv)
deploy <subcommand> ............. (paid) Appflow Deploy functionality (subcommands: add, build, configure, manifest)    doctor <subcommand> ............. Commands for checking the health of your Ionic project (subcommands: check, list,
                                  treat)
enterprise <subcommand> ......... (paid) Manage Ionic Enterprise features (subcommands: register)
generate ........................ Automatically create framework features (alias: g)
git <subcommand> ................ (paid) Commands relating to managing Appflow git (subcommands: remote)
integrations <subcommand> ....... Manage various integrations in your app (subcommands: disable, enable, list)
                                  (aliases: i, integration)
link ............................ (paid) Connect local apps to Ionic
package <subcommand> ............ (paid) Appflow package functionality (subcommands: build, deploy)
repair .......................... Remove and recreate dependencies and generated files
serve ........................... Start a local dev server for app dev/testing (alias: s)
ssl <subcommand> ................ (experimental) Commands for managing SSL keys & certificates (subcommands:
                                  generate)

I GOT ERROR

Was this page helpful?
0 / 5 - 0 ratings