Skip to content

update fails if a plugin is not bower registered #180

@chris-steele

Description

@chris-steele

Subject of the issue/enhancement/features

Running adapt update may produce a runtime error if there are plugins not registered with bower registry being used.

The cause seems to be trying to read _sourceInfo in getMatchingVersion (Plugin.js). The property is null if trying to retrieve bower info from a registry that does not have the requested plugin registered.

Your environment

  • 3.0.7
  • Windows 10

Steps to reproduce

See description

Expected behaviour

The update command should skip unregistered plugins

Actual behaviour

 Cannot read properties of null (reading 'framework')
    at getMatchingVersion (file:///C:/Users/Chris/AppData/Roaming/nvm/v16.18.1/node_modules/adapt-cli/lib/integration/Plugin.js:296:79)
    at Target.findCompatibleVersion (file:///C:/Users/Chris/AppData/Roaming/nvm/v16.18.1/node_modules/adapt-cli/lib/integration/Plugin.js:321:33)
    at file:///C:/Users/Chris/AppData/Roaming/nvm/v16.18.1/node_modules/adapt-cli/lib/integration/PluginManagement/update.js:115:22
    at file:///C:/Users/Chris/AppData/Roaming/nvm/v16.18.1/node_modules/adapt-cli/lib/util/promises.js:16:12
    at C:\Users\Chris\AppData\Roaming\nvm\v16.18.1\node_modules\adapt-cli\node_modules\async\dist\async.js:151:38
    at replenish (C:\Users\Chris\AppData\Roaming\nvm\v16.18.1\node_modules\adapt-cli\node_modules\async\dist\async.js:446:21)
    at C:\Users\Chris\AppData\Roaming\nvm\v16.18.1\node_modules\adapt-cli\node_modules\async\dist\async.js:451:13
    at eachOfLimit$1 (C:\Users\Chris\AppData\Roaming\nvm\v16.18.1\node_modules\adapt-cli\node_modules\async\dist\async.js:477:34)
    at C:\Users\Chris\AppData\Roaming\nvm\v16.18.1\node_modules\adapt-cli\node_modules\async\dist\async.js:219:25

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions