I am trying to install Ionic 2 but it is giving error in the time to run npm install -g Ionic codova

Asked

Viewed 435 times

1

Gustavo@Gustavo-PC MINGW64 ~
$ npm install -g cordova ionic
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher                                                                                                                 to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher                                                                                                                 to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher                                                                                                                 to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Use uuid module instead
C:\Users\Gustavo\AppData\Roaming\npm\cordova -> C:\Users\Gustavo\AppData\Roaming\npm\node_modules\cordova\bin\cordova
C:\Users\Gustavo\AppData\Roaming\npm\ionic -> C:\Users\Gustavo\AppData\Roaming\npm\node_modules\ionic\bin\ionic
C:\Users\Gustavo\AppData\Roaming\npm
+-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
.
.
.
  | `-- [email protected]
    `-- [email protected]

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\ionic\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN In [email protected] replacing bundled version of mime-types with [email protected]
npm WARN In [email protected] replacing bundled version of cross-spawn with [email protected]
npm WARN In [email protected] replacing bundled version of semver with [email protected]
npm WARN In [email protected] replacing bundled version of form-data with [email protected]
npm WARN In [email protected] replacing bundled version of request with [email protected]
npm WARN In [email protected] replacing bundled version of ionic-app-lib with [email protected]

Gustavo@Gustavo-PC MINGW64 ~
$ ionic
bash: ionic: command not found

Gustavo@Gustavo-PC MINGW64 ~
$ cordova --version
bash: cordova: command not found

Gustavo@Gustavo-PC MINGW64 ~
$ ionic start like_app sidemenu --v2
bash: ionic: command not found
  • In fact, it seems to me that the package has been installed despite the warnings. See if the path to the ionic is in your PATH

  • worked out really this missing the way in the PATH, I had switched the system to another HD and ended up not seeing the way.

  • I’ll create an answer, and you can mark it as correct. =)

1 answer

0


The warnings of the NPM (WARN) should not prevent the operation of your package. They occur when something could be improved, or when some method is deprecated, or when some other package is recommended, but, by itself, do not prevent the functioning of it. Problems occur when you have errors (ERR), and then yes the functioning will be compromised.

In your case, warnings are about deprecated methods (which will eventually stop working), optional dependencies that have not been installed, and some places that the installer, for some reason, thought it should do. That is, the package was installed correctly.

Your problem is in PATH, which is where you set the path to binary packages that you want to run via the command line. In Windows 7, where I am now (yes, Windows 7 =/), just press the "Windows" key and enter "environment variables". In the first result, a dialog is already open for you to edit the PATH. Concatene, in that string, the way of ionic (something like C:\user\node_modules\ionic\bin). After that, everything should work!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.