Skip to content

pluginloader.js removes globally installed npm packages during plugin uninstalling #403

@SARTHAK2427

Description

@SARTHAK2427

Description

The removeTest function in src/plugins/pluginloader.js uses the command:

npm rm -g ${pluginName}

This results in the package being uninstalled globally from the system, rather than just being removed from the Neutralino CLI plugin registry or local project scope

Steps to Reproduce

  1. Create and install a test package globally:
mkdir test-package && cd test-package
npm init -y
cd ..
npm install -g ./test-package
  1. Make sure it's globally installed
npm list -g test-package
  1. Run the CLI removal command
neu plugins test-package --remove --test
  1. Verification
npm list -g test-package

Expected Behavior:

  • The CLI should only:
    • Remove the plugin from its internal configuration/registry
    • Optionally remove local project-level dependencies
  • It should not uninstall globally installed npm packages

Actual Behavior:

  • The globally installed package is removed from the system

I reproduced this on my system, and running the CLI command deleted the globally installed package without any warning or confirmation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions