I can't use appium after installation 'MODULE_NOT_FOUND'

24 views Asked by At

I installed appium using npm install -g appium but after that I run appium --version to check and I found out that:

appium --version
node:internal/modules/cjs/loader:1145
  throw err;
  ^

Error: Cannot find module 'C:\Users\p_cra\Usersp_craAppDataRoamingnpmnode_modulesappiumlibmain.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1142:15)
    at Module._load (node:internal/modules/cjs/loader:983:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
Node.js v21.7.1

I don't know why the path to the directory seems to be duplicated at the beginning, I've tried uninstalling node and appium and re-installing them countless times but it keeps giving me the same problem.

When a run:

npm ls -g --depth=0
C:\Users\p_cra\AppData\Roaming\npm
├── [email protected]
├── [email protected]
├── [email protected] -> .\..\..\..
└── [email protected]

I see the appium as installed.

0

There are 0 answers