cgkineo / adapt-visua11y

An extension which provides visual accessibility improvements

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adapt CLI install/devinstall issues

swashbuck opened this issue Β· comments

Subject of the issue

I cannot successfully install Visua11y using adapt install or adapt devinstall. This happens when using either visua11y or adapt-visua11y as the target plugin.

Your environment

  • Adapt Framework v5.31.21
  • Adapt CLI v3.0.11

Steps to reproduce

  1. Run adapt install adapt-visua11y
Screenshot 2023-08-09 at 9 15 38 AM
  1. Select the master branch to install

Expected behaviour

Visua11y should be installed.

Actual behaviour

Visua11y is not installed.

Installing plugins 100% completeTypeError: Cannot read properties of null (reading 'component')

at file:///Users/xxxxxx/.nvm/versions/node/v18.16.0/lib/node_modules/adapt-cli/lib/integration/Plugin.js:331:62
at Array.find (<anonymous>)
at Target.getType (file:///Users/xxxxxx/.nvm/versions/node/v18.16.0/lib/node_modules/adapt-cli/lib/integration/Plugin.js:331:45)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Target.getTypeFolder (file:///Users/xxxxxx/.nvm/versions/node/v18.16.0/lib/node_modules/adapt-cli/lib/integration/Plugin.js:342:18)
at async Target.install (file:///Users/xxxxxx/.nvm/versions/node/v18.16.0/lib/node_modules/adapt-cli/lib/integration/Target.js:161:30)

@oliverfoster Apparently, this plugin is not registered. When I try to register it, I get this error from Adapt CLI (register() in lib/integration/PluginManagement/register.js):

Error: The package you are trying to register is marked as private

Should I change private to 'false' in bower.json and package.json?

Please definitely do not commit a change to the private value. That would cause the plugin to be registered on npm by the github release automation. Perhaps try changing it locally before registering? See if that makes a difference. Then we can fix up the adapt-cli register functionality if that works.

Changing it to "private": false locally didn't help. I believe it's looking at the bower.json that's on the master branch (or possibly the latest tag or release) in the GitHub repo rather than what I have locally.

That would cause the plugin to be registered on npm by the github release automation.

@oliverfoster Since this isn't a private Kineo plugin, don't we want it to be registered on npm? Since it's public?

In bower's register.js:

        // Attempt to resolve the package referenced by the URL to ensure
        // everything is ok before registering
        repository = new PackageRepository(config, logger);
        return repository.fetch({ name: name, source: url, target: '*' });
    })
        .spread(function(canonicalDir, pkgMeta) {
            if (pkgMeta.private) {
                throw createError(
                    'The package you are trying to register is marked as private',
                    'EPRIV'
                );
            }

I had also added the repo information to bower and package:

  "repository": {
    "type": "git",
    "url": "https://github.com/cgkineo/adapt-visua11y.git"
  },

No, we don't want any adapt components registered on npm because they're not installable from npm. You can't npm install adapt-visua11y npm is the registry for the npm cli.

@oliverfoster Ok, thanks for clearing that up.

Would the solution here be to temporarily change private to 'true' in the repo, register the plugin via adapt-cli, and then change it back to 'false'?

I'm pondering on a possible, easy solution. Give me some time to think about it.

Ok, thanks. In the meantime, I've created a linked PR to add the repo details.

πŸŽ‰ This issue has been resolved in version 2.5.3 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

Approved πŸ‘

@oliverfoster Closing this ticket as the two related tickets have now been merged.

adaptlearning/adapt-cli#199
adaptlearning/adapt-cli#201