BabylonJS / Editor

Community managed visual editor for Babylon.js
http://editor.babylonjs.com/
813 stars 232 forks source link

How does Add from NPM for plugins work in the Editor #378

Open eherozhao opened 1 year ago

eherozhao commented 1 year ago

Describe the bug

Installing the plugins in the BJS Editor using the “Add from NPM…” option does not work.

To Reproduce

We created an issue on our plugin page: https://github.com/aws-samples/aws-tools-for-babylonjs-editor/issues/29 The plugin was not listed as expected.

Meanwhile, running it on different terminal system will have the different output in the popped-up window. Running in oh-my-zsh, it will have the following output:

Screen Shot 2022-05-18 at 3 45 03 PM

How does the Editor or BabylonJS Project recognize the plugin by npm install?

Expected behavior

Plugin should be added into the Editor.

julien-moreau commented 1 year ago

Hi @eherozhao !

I have reproduced and the problem appears for macOS users (like me).

I have to rework plugins management that come from NPM. All these packages should be added in the project instead of globally. Today they are installed globally this is why the password is required but it is broken on macOS.

I'm trying to fix that for the coming week

julien-moreau commented 1 year ago

Hi @eherozhao ! I have just fixed the usage of plugins installed from NPM. Previously they were installed globally (npm i -g) but on some systems env was partial or empty. Now, and I think this is what we want, plugins installed from NPM are per project. Than means each project can have its own plugin version and these plugins are added to the dev dependencies of the project.

I'm testing and will release ASAP in 4.3.1

rhahn28 commented 1 year ago

Hi, having the same issue with the two aws plugins. Would appreciate the help. Thanks

https://github.com/aws-samples/aws-tools-for-babylonjs-editor/

eherozhao commented 1 year ago

Hi, having the same issue with the two aws plugins. Would appreciate the help. Thanks

https://github.com/aws-samples/aws-tools-for-babylonjs-editor/

Hey @rhahn28, you can download the package and add the plugin from local path right now.

rhahn28 commented 1 year ago

eherozhao, I was able to install the Hosts Plugin but not aws-amplify-publisher-plugin/

Also, is there any documentation on using amplify

eherozhao commented 1 year ago

eherozhao, I was able to install the Hosts Plugin but not aws-amplify-publisher-plugin/

Also, is there any documentation on using amplify

Thank you @rhahn28 for using the plugins. Do you mind asking the question on the Plugin repo by creating an issue for more visibility?

rrjgithub commented 1 year ago

Running into the same issue on MacOS. I tried from local path as well on 4.2.0 and 4.3.0 client as well. couldn't get either of the plugins to work. @rhahn28 how did you get the hosts plugin working?

eherozhao commented 1 year ago

@rrjgithub could you please creating the issue into Plugin repo for visibility?

eherozhao commented 1 year ago

Hi @eherozhao ! I have just fixed the usage of plugins installed from NPM. Previously they were installed globally (npm i -g) but on some systems env was partial or empty. Now, and I think this is what we want, plugins installed from NPM are per project. Than means each project can have its own plugin version and these plugins are added to the dev dependencies of the project.

I'm testing and will release ASAP in 4.3.1

Hey @julien-moreau, I saw 4.4.0 was released. Have you included this NPM improvement into this version?

julien-moreau commented 1 year ago

Hi @eherozhao ! Was going to ask you if you can test the npm improvement in order to keep opened or close this issue :) Now, when adding from NPM, plugins are installed locally in the workspace instead of globally. Can you try that for me? I tested on my side and everything worked Thanks a lot !

Complete release info available here: https://github.com/BabylonJS/Editor/releases/tag/v4.4.0

eherozhao commented 1 year ago

Hi @julien-moreau! Thank you for the new version. I did a quick test about adding the plugins from NPM but it seems I only successfully added aws-amplify-publisher-plugin and the open-host-plugin was not shown in the Editor tab but in the plugins window. Was that the same as your side?