Configuration of environment variables - Commands do not work - Ionic

-1

You are experiencing the following error:

'ionic' is not recognized as an internal command or external, operable program or batch file.

But this command appears only in cmder, at the node.js prompt I installed it works "normal". When creating an application with Ionic 3 it does not refresh the page during development, when it saves, for example. Could it be another problem or is it really the environment variable? Here's my environment variable setting.

    
asked by anonymous 12.11.2018 / 17:34

1 answer

2

Updating the page after changing a file (livereload) does not have to do with the environment variables. Environment variables are "shortcuts" for you to access certain commands.

In the case of the ionic command, you do not need to configure it in the Windows environment variables, you just have to install Ionic globally that the commands will already be available to use.

At the Windows terminal, run the following commands:

  • npm install -g ionic (installs Ionic globally)

  • ionic start nomeDoProjeto tabs (creates an Ionic project)

  • cd nomeDoProjeto (accesses the project folder)

  • ionic serve (opens a web page with the project running)

  • Any changes you make to project files should make the page reload automatically with those changes.

    Reference: Free Mobile App Development: Getting Started with Ionic Apps

        
    13.11.2018 / 15:34