Closed chris-steele closed 4 weeks ago
It looks like there is a similar error when running adapt ls
.
@oliverfoster What about changing this line to:
if (!this.isPresent || !this._sourceInfo?.version || !this._sourceInfo?.framework) return null;
This seems to resolve the issue.
I can't replicate on version 3.1.4 in either case, for adapt update and adapt ls. I've tested with a local plugin and with a non existent plugin in the adapt.json file.
Please reopen if you have replication instructions.
@oliverfoster I am also using 3.1.4. Will you try this?
git clone git@github.com:cgkineo/adapt-toc.git
"adapt-toc": "*"
. I get the error either way.adapt update --check
Result:
TypeError: Cannot read properties of null (reading 'framework')
at getMatchingVersion (file:///Users/bradsimpson/.nvm/versions/node/v20.11.1/lib/node_modules/adapt-cli/lib/integration/Plugin.js:298:79)
at Target.findCompatibleVersion (file:///Users/bradsimpson/.nvm/versions/node/v20.11.1/lib/node_modules/adapt-cli/lib/integration/Plugin.js:323:33)
at file:///Users/bradsimpson/.nvm/versions/node/v20.11.1/lib/node_modules/adapt-cli/lib/integration/PluginManagement/update.js:115:22
at file:///Users/bradsimpson/.nvm/versions/node/v20.11.1/lib/node_modules/adapt-cli/lib/util/promises.js:16:12
at /Users/bradsimpson/.nvm/versions/node/v20.11.1/lib/node_modules/adapt-cli/node_modules/async/dist/async.js:151:38
at replenish (/Users/bradsimpson/.nvm/versions/node/v20.11.1/lib/node_modules/adapt-cli/node_modules/async/dist/async.js:448:21)
at iterateeCallback (/Users/bradsimpson/.nvm/versions/node/v20.11.1/lib/node_modules/adapt-cli/node_modules/async/dist/async.js:432:21)
at /Users/bradsimpson/.nvm/versions/node/v20.11.1/lib/node_modules/adapt-cli/node_modules/async/dist/async.js:329:20
at invokeCallback (/Users/bradsimpson/.nvm/versions/node/v20.11.1/lib/node_modules/adapt-cli/node_modules/async/dist/async.js:182:13)
at /Users/bradsimpson/.nvm/versions/node/v20.11.1/lib/node_modules/adapt-cli/node_modules/async/dist/async.js:174:13
That helped. Thanks.
:tada: This issue has been resolved in version 3.1.5 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
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
ingetMatchingVersion
(Plugin.js). The property isnull
if trying to retrieve bower info from a registry that does not have the requested plugin registered.Your environment
Steps to reproduce
See description
Expected behaviour
The
update
command should skip unregistered pluginsActual behaviour