adobe-uxp / devtools-cli

CLI for UXP developer tools, including creating, loading and debugging plugins.
Apache License 2.0
22 stars 6 forks source link

Installation failure #9

Open littleCareless opened 2 years ago

littleCareless commented 2 years ago

The following is the installation log:

PS D:\UXP\xxxxx> npm install @adobe/uxp-devtools-cli npm ERR! code 1 npm ERR! path D:\UXP\xxxxx\node_modules\@adobe\uxp-devtools-cli npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/setupInspectApp.js npm ERR! node:internal/modules/cjs/loader:936 npm ERR! throw err; npm ERR! ^ npm ERR! npm ERR! Error: Cannot find module '@adobe/uxp-devtools-app/package.json' npm ERR! Require stack: npm ERR! - D:\UXP\xxxxx\node_modules\@adobe\uxp-devtools-cli\scripts\setupInspectApp.js npm ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) npm ERR! at Function.resolve (node:internal/modules/cjs/helpers:108:19) npm ERR! at generateDevtoolsAppPacakge (D:\UXP\xxxxx\node_modules\@adobe\uxp-devtools-cli\scripts\setupInspectApp.js:17:37) npm ERR! at Object. (D:\UXP\xxxxx\node_modules\@adobe\uxp-devtools-cli\scripts\setupInspectApp.js:27:1) npm ERR! at Module._compile (node:internal/modules/cjs/loader:1105:14) npm ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) npm ERR! at Module.load (node:internal/modules/cjs/loader:981:32) npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:822:12) npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) npm ERR! at node:internal/main/run_main_module:17:47 { npm ERR! code: 'MODULE_NOT_FOUND', npm ERR! requireStack: [ npm ERR! 'D:\UXP\xxxxx\node_modules\@adobe\uxp-devtools-cli\scripts\setupInspectApp.js' npm ERR! ] npm ERR! }

jeffcollaboro commented 1 year ago

Has this Repo been abandoned? Awful experience, after much hacking moving files around, and messing with symlinks we managed to get this API to mostly work. But wow, days of messing around on Windows machines. It seems if you install the repo directly into your global node packages folder under @adobe. Yarn install --force (cause there are issues with jest versions, we can safetly ignore), then move the contents of the packages folder one level higher under the @adobe folder (We did this using npm v8.19.3 & Yarn 1.22.19). We also found that NVM screws up the installation and requires a symlink created under the nvm folder to point to the global npm packages folder.... Like I said painful experience.

We are currently attempting to build a container to attempt to use the UXP build and test processes from a Pipeline. A lot of energy has gone into that, it would be nice if Adobe could provide a working one.

I've got to say that if you are planning on going down the path of UXP development, So far we have found UXP underwhelming as a whole. There is only support for Photoshop and Indesign, with no indication of when and if other products in the suite will be supported (This makes it impossible to provide serious commercial offerings). The sandbox that UXP operates in is a highly hobbled browser DOM, simple things like the DOM history object are not available, making most page routing libraries useless. We developed using svelte, and eventually got it to work, but retrospectively think that react would have been easier, the Adobe crowd seem strangely, highly oppinionated about your tech stack. Oh and if you get confused about why your controls aren't working, there are a very limited set of the Spectrum controls that are supported, and there documentation as to the supported ones are not up to date. There appears to be no developer licensing option. The examples are pretty light on but you can grok a bit of knowledge out of there.

hansottowirtz commented 1 year ago

I just spent some time fixing and publishing some install issues in these packages. I can now use the uxp command.

If you want to try:

npm i -g @adobe-fixed-uxp/uxp-devtools-cli

These work:

uxp plugin load
uxp plugin watch
uxp plugin package
uxp plugin debug (on Mac)

You need to have the "Adobe UXP Developer Tool" running.

jeffcollaboro commented 1 year ago

@hansottowirtz You my friend are a legend.

... "You need to have the "Adobe UXP Developer Tool" running.", This seems a little strange to me, I'm not certain that requiring a UI to run a CLI makes a lot of sense, I'm trying to get this to work in a pipeline. I'm going to play around with it, amm hoping I can package without a UI.

hansottowirtz commented 1 year ago

Thank you! I think that will be hard, because the uxp command communicates with the "Adobe UXP Developer Tool" (over websockets). It might be possible to run the "Adobe UXP Developer Tool" on some shared computer, then open port 14001 (they use it for the websockets) and then change the host on this line: https://github.com/bubblydoo/devtools-cli/blob/fa7fa0c766b524de514fce6f00c24adec4c2e8ab/packages/uxp-devtools-core/src/core/client/connection/CliClientController.js#L105

But yea, far from ideal.

Apoorva2405 commented 1 year ago

Hi, As mentioned on the Readme, CLI packaging is not yet completed due to multiple existing issues hence to use CLI currently, you can either download the latest package and run yarn install command, or follow the repo setup as mentioned here and it should work as expected.

Also, please note that app UI is needed for few CLI commands such as uxp plugin debug and logs