jlipps / appium-ocr-plugin

Tesseract-based OCR plugin for Appium
35 stars 8 forks source link

ocr plugin does not work for version 0.2.1 #15

Open P4radise opened 4 days ago

P4radise commented 4 days ago

After updating the plugin to version 0.2.1 I started to receive the following error when running this plugin.

appium --relaxed-security --use-plugins=ocr
[Appium] Attempting to load plugin ocr...
[Appium] Requiring plugin at /Users/username/node_modules/appium-ocr-plugin/build/index.js
[Appium] Could not load plugin 'ocr', so it will not be available. Error in loading the plugin was: Cannot find module '/Users/username/node_modules/appium-ocr-plugin/build/index.js' imported from /opt/homebrew/lib/node_modules/appium/build/lib/extension/extension-config.js
[Appium] Error: Cannot find module '/Users/username/node_modules/appium-ocr-plugin/build/index.js' imported from /opt/homebrew/lib/node_modules/appium/build/lib/extension/extension-config.js
    at finalizeResolution (node:internal/modules/esm/resolve:257:11)
    at moduleResolve (node:internal/modules/esm/resolve:914:10)
    at defaultResolve (node:internal/modules/esm/resolve:1038:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
    at onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:482:36)
    at TracingChannel.tracePromise (node:diagnostics_channel:337:14)
    at ModuleLoader.import (node:internal/modules/esm/loader:481:21)
    at defaultImportModuleDynamicallyForScript (node:internal/modules/esm/utils:227:31)
    at importModuleDynamicallyCallback (node:internal/modules/esm/utils:249:12)
    at PluginConfig.requireAsync (/opt/homebrew/lib/node_modules/appium/lib/extension/extension-config.js:600:23)
    at /opt/homebrew/lib/node_modules/appium/lib/extension/index.js:53:26

I also see that the package.json and package-lock.json files have not been updated to indicate the new version 0.2.1.

groooooomit commented 3 days ago

Same issue, any update?

groooooomit commented 3 days ago

@P4radise Uninstall 0.2.1 and install 0.2.0 temporary fix this issue

appium plugin install --source=npm appium-ocr-plugin@0.2.0

P4radise commented 3 days ago

@groooooomit Yes, thanks, I know, but I wish the latest version was fixed :)