eclipse-emfcloud / theia-tree-editor

theia-tree-editor
Other
15 stars 12 forks source link

Cannot find module '@jsonforms/react' #78

Closed snoop244 closed 1 year ago

snoop244 commented 1 year ago

Trying to run the tree editor using Yeoman. I've had success with the other Theia extension examples, but this one shows the following error in the console for both the web and electron. It seems to build fine oddly, but I only get the spinning progress indicator and this error in the console:

index.js:70 Error: Cannot find module '@jsonforms/react'
    at webpackMissingModule (detail-form-widget.tsx:12:1)
    at ../node_modules/@eclipse-emfcloud/theia-tree-editor/lib/browser/detail-form-widget.js (detail-form-widget.tsx:12:1)
    at __webpack_require__ (bootstrap:19:1)
    at ../node_modules/@eclipse-emfcloud/theia-tree-editor/lib/browser/index.js (index.ts:11:1)
    at __webpack_require__ (bootstrap:19:1)
    at ../tree-editor/lib/browser/tree/tree-editor-widget.js (tree-editor-widget.ts:6:1)
    at __webpack_require__ (bootstrap:19:1)
    at ../tree-editor/lib/browser/tree-contribution.js (tree-contribution.ts:6:1)
    at __webpack_require__ (bootstrap:19:1)
    at ../tree-editor/lib/browser/tree-editor-frontend-module.js (tree-editor-frontend-module.ts:9:1)

edit: the above issue is not happening when I clone this repo and run the example. Odd.

Also, I wanted to thank you for this repo - it's a great example of how to build an interesting editor that, frankly, I found to be a challenge in vscode. Unfortunately, until I came upon your brilliant documentation on creating a custom editor here in this repo, along with the example, I was really struggling. I was under the impression that what made Theia different and better than vscode was mostly about custom editors - yet I couldn't find one document on how to implement them.... so thanks again.

lucas-koehler commented 1 year ago

Hi @snoop244 , thanks for the report. The reason for this behavior is that we recently changed the jsonforms dependencies from direct dependencies to peer dependencies. The issue arises because the yeoman generator has not been adapted, yet. I opened PR https://github.com/eclipse-theia/generator-theia-extension/pull/174 to fix this in the generator.

snoop244 commented 1 year ago

I just tried the Yo-based tree-editor that I saw was just updated in the Theia Yo repo. The good news is the issue with the Jsonforms is resolved. The UX loads for both browser and electron. Unfortunately I get a "No applicable renderer found" in the main panel in both cases. I also notice that the idons to the left of each node/label in the tree itself are missing. I recall seeing them when I cloned this repo and successfully ran the example (vs the Yo-based approach).

edit: this could be irrelevant, but I get a WARN in the console about not finding the schema for type leaf.

lucas-koehler commented 1 year ago

Hi @snoop244 , when you tried the Yo-based tree-editor again, did you try to open the data from this repo's example or did you generate an example file via the main menu? It is expected that the file from this repo's example does not work in the Yo-based editor because it does not use the same schema as the example in this repo.

snoop244 commented 1 year ago

I tried the example. Unfortunately, I'm not able to test any other approaches at the moment.

On Tue., Aug. 29, 2023, 6:29 a.m. Lucas Koehler, @.***> wrote:

Hi @snoop244 https://github.com/snoop244 , when you tried the Yo-based tree-editor again, did you try to open the data from this repo's example or did you generate an example file via the main menu? It is expected that the file from this repo's example does not work in the Yo-based editor because it does not use the same schema as the example in this repo.

— Reply to this email directly, view it on GitHub https://github.com/eclipse-emfcloud/theia-tree-editor/issues/78#issuecomment-1697176411, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYBTIVYE5FSK2H54VT3LBTXXXACBANCNFSM6AAAAAA35QC54A . You are receiving this because you were mentioned.Message ID: @.***>

lucas-koehler commented 1 year ago

Hi @snoop244 , no problem. Because the Yo example worked fine for me after the update in https://github.com/eclipse-theia/generator-theia-extension/pull/174, I'll close this now. Feel free to reopen if you continue having issues.

snoop244 commented 1 year ago

Thank you Lucas!

On Tue, Aug 29, 2023 at 11:34 AM Lucas Koehler @.***> wrote:

Hi @snoop244 https://github.com/snoop244 , no problem. Because the Yo example worked fine for me after the update in eclipse-theia/generator-theia-extension#174 https://github.com/eclipse-theia/generator-theia-extension/pull/174, I'll close this now. Feel free to reopen if you continue having issues.

— Reply to this email directly, view it on GitHub https://github.com/eclipse-emfcloud/theia-tree-editor/issues/78#issuecomment-1697687080, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYBTIWVLXHLACSQ22VRPNLXXYDXHANCNFSM6AAAAAA35QC54A . You are receiving this because you were mentioned.Message ID: @.***>