Duplicated
Duplicated

Reputation: 85

node - cordova . "unmet dependency"

i tried to clean the cache and install it again but it says a warning unmet dependency

C:\Users\Ralph>npm cache clean

C:\Users\Ralph>npm install -g cordova

C:\Users\Ralph\AppData\Roaming\npm\cordova -> C:\Users\Ralph\AppData\Roaming\npm \node_modules\cordova\bin\cordova npm WARN unmet dependency C:\Users\Ralph\AppData\Roaming\npm\node_modules\phoneg ap\node_modules\connect-phonegap requires shelljs@'0.2.6' but will load npm WARN unmet dependency C:\Users\Ralph\AppData\Roaming\npm\node_modules\phoneg ap\node_modules\shelljs, npm WARN unmet dependency which is version 0.1.4 npm WARN unmet dependency C:\Users\Ralph\AppData\Roaming\npm\node_modules\phoneg ap\node_modules\cordova\node_modules\plugman requires request@'2.22.0' but will load npm WARN unmet dependency C:\Users\Ralph\AppData\Roaming\npm\node_modules\phoneg ap\node_modules\cordova\node_modules\request, npm WARN unmet dependency which is version 2.21.0 [email protected] C:\Users\Ralph\AppData\Roaming\npm\node_modules\cordova ├── [email protected] ├── [email protected] ├── [email protected] ([email protected]) └── [email protected] ([email protected], [email protected], properties-parser@0. 2.3, [email protected], [email protected], [email protected], [email protected], [email protected] , [email protected], [email protected], [email protected], [email protected], [email protected], through [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], d8@ 0.4.4, [email protected])

thank you in advance

Upvotes: 1

Views: 738

Answers (1)

Phileo99
Phileo99

Reputation: 5659

Cordova cannot run on the latest version of Node because it actually requires v10.x of Node. So, here is how I avoided the "Warning: unmet dependency" when installing Cordova:

  1. > npm uninstall -g cordova
  2. Use n (nvm for Windows) to downgrade an older version of Node (Windows users will need to downgrade and use):

    > n 0.10.40

  3. > npm cache clean

  4. > npm install -g cordova

If you want to install Ionic, then in step 4, call the npm command to directly install ionic (with no @latest) instead of cordova, like this:

  1. > npm install -g ionic

Note: Linux / OSX users may need to prepend the npm commands with "sudo".

Upvotes: 0

Related Questions