Search code examples
node.jsappium

Appium is not installing


I installed appium on windows through command. But when I tried to run, it shows error.

C:\Users\Admin>appium internal/modules/cjs/loader.js:969 throw err; ^ Error: Cannot find module 'C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\build\lib\main.js'

Error after installing appium

Image of console enter image description here


Solution

  • Installation is failing because files it needs to create already exist. You need to pass the --force flag when installing to overwrite these files:

    npm install -g --force appium