appium / appium-inspector

A GUI inspector for mobile apps and more, powered by a (separately installed) Appium server
https://appium.github.io/appium-inspector/
Other
1.15k stars 284 forks source link

bug: I can't run "2024.6.1" using "npm run dev" #1511

Closed keiches closed 2 months ago

keiches commented 3 months ago

Is this an issue specifically with Appium Inspector?

Is there an existing issue for this?

Current Behavior

I followed the steps below:

npm ci npm run dev However, Electron didn't start due to the following error:

After researching the error, I found that it was caused by the CJS loader being unable to find the "node " module. The module path should be "internal/.../url.js".

Please help.

internal/process/warning.js:43 (node:14464) UnhandledPromiseRejectionWarning: Error: Cannot find module 'node:url' Require stack: - C:\appium\appium-inspector\node_modules\glob\dist\commonjs\glob.js - C:\appium\appium-inspector\node_modules\glob\dist\commonjs\index.js - C:\appium\appium-inspector\node_modules\rimraf\dist\commonjs\index.js - C:\appium\appium-inspector\node_modules\electron-extension-installer\dist\index.js - C:\appium\appium-inspector\dist\main.js - C:\appium\appium-inspector\node_modules\electron\dist\resources\default_app.asar\main.js - at Module._resolveFilename (internal/modules/cjs/loader.js:887:15) at Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128) at Module._load (internal/modules/cjs/loader.js:732:27) at Function.f._load (electron/js2c/asar_bundle.js:5:12913) at Module.require (internal/modules/cjs/loader.js:959:19) at require (internal/modules/cjs/helpers.js:88:18) at Object. (C:\appium\appium-inspector\node_modules\glob\dist\commonjs\glob.js:5:20) at Module._compile (internal/modules/cjs/loader.js:1078:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10) at Module.load (internal/modules/cjs/loader.js:935:32) (Use `electron --trace-warnings ...` to show where the warning was created) ### Expected Behavior i expect "npm run dev". :-).... ### Operating System Mac ### Appium Inspector Version 2024.6.1 ### Appium Version _No response_ ### Further Information Node.js: 20.12.2 or 18.20.3 OS: Windows 11 or macOS Sonoma Git #: 984087dc73b12e79160fedffc5c42a57394d2736
eglitise commented 3 months ago

Yes, I've noticed this too, but I'm not really sure what causes it or how to solve it :( You can work around this by commenting out the line await installExtensions(); at app/main/main.js:22

keiches commented 3 months ago

Yes, I've noticed this too, but I'm not really sure what causes it or how to solve it :( You can work around this by commenting out the line await installExtensions(); at app/main/main.js:22

Thank you for your super quick reply.

@eglitise what is your electron version actually installed?

eglitise commented 3 months ago

This app uses the outdated Electron 13.6.9, which I would very much like to upgrade, but doing so causes issues with the Parcel 1 build tool (which is also outdated and should be replaced). It requires a fair amount of changes that are tracked in #1453.