aws-samples / aws-tools-for-babylonjs-editor

AWS Tools for Babylon.JS Editor is a suite of tools meant to interact with Babylon.JS Editor by utilizing the capabilities of AWS products.
Apache License 2.0
29 stars 8 forks source link

Hosts plugin fails to activate when installed via NPM #29

Open Krxtopher opened 2 years ago

Krxtopher commented 2 years ago

Describe the bug Installing the hosts plugin in the BJS Editor using the “Add from NPM…” option does not work.

To Reproduce Steps to reproduce the behavior:

  1. In the BJS Editor, Select Edit > Preferences... > Plugins
  2. Click Add From NPM...
  3. Enter the package name @aws/aws-tools-for-babylonjs-editor-open-source-hosts-plugin and click OK.
  4. A terminal-like window will open with the following output:
    
    sudo npm i -g @aws/aws-tools-for-babylonjs-editor-open-source-hosts-plugin && exit

exit

/  & exit Password: Sorry, try again. Password:


5. Enter your local computer admin password and press Enter.
6. Observe that the NPM install process proceeds and the window automatically closes. (I could not confirm whether the install completed successfully before the window closes.)
7. Observe that the plugin is not listed as expected in the list of "Available Plugins".

**Expected behavior**
Plugin should be available and activated after selecting this plugin install option.

**Screenshots**
n/a

**Desktop (please complete the following information):**
 - OS: macOS Monterey 12.3.1
 - Browser: n/a
 - Version: Babylon.JS Editor v4.2.0
aymenmasri commented 1 year ago

Try this script as a workaround (to be applied on the root project folder) !

#!/bin/bash

npm install --save-dev @aws/aws-tools-for-babylonjs-editor-open-source-hosts-plugin
mv workspace.editorworkspace workspace.editorworkspace.original
cat workspace.editorworkspace.original | jq  '. + {plugins: [{enabled: true, fromNpm: true, name: "@aws/aws-tools-for-babylonjs-editor-open-source-hosts-plugin", path: "@aws/aws-tools-for-babylonjs-editor-open-source-hosts-plugin"}]}' > workspace.editorworkspace

image