Editor icon indicating copy to clipboard operation
Editor copied to clipboard

How does Add from NPM for plugins work in the Editor

Open eherozhao opened this issue 3 years ago • 11 comments

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.

eherozhao avatar May 19 '22 21:05 eherozhao

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 avatar May 20 '22 19:05 julien-moreau

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

julien-moreau avatar Jun 05 '22 23:06 julien-moreau

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/

rhahn28 avatar Jun 07 '22 05:06 rhahn28

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.

eherozhao avatar Jun 07 '22 05:06 eherozhao

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

Also, is there any documentation on using amplify

rhahn28 avatar Jun 08 '22 05:06 rhahn28

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?

eherozhao avatar Jun 08 '22 21:06 eherozhao

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?

rrjgithub avatar Aug 14 '22 04:08 rrjgithub

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

eherozhao avatar Aug 15 '22 16:08 eherozhao

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?

eherozhao avatar Aug 15 '22 17:08 eherozhao

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

julien-moreau avatar Aug 15 '22 20:08 julien-moreau

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?

eherozhao avatar Aug 17 '22 18:08 eherozhao