yii2-usuario icon indicating copy to clipboard operation
yii2-usuario copied to clipboard

No valid bower.json was found in any branch or tag of https://github.com/selectize/selectize.js.git

Open EndErr opened this issue 4 years ago • 8 comments

Getting that error when try to update with "composer update"

EndErr avatar Jul 25 '20 13:07 EndErr

Can you post the full error? From what version and to which one are you upgrading?

maxxer avatar Jul 26 '20 06:07 maxxer

I try to do a simple composer update

The out is: `# composer update Loading composer repositories with package information Updating dependencies (including require-dev)

[Composer\Repository\InvalidRepositoryException] No valid bower.json was found in any branch or tag of https://github.com/selectize/selectize.js.git, could not load a package from it.

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] []... #`

My composer.json require section: "require": { "php": ">=5.4.0", "yiisoft/yii2": "~2.0.6", "yiisoft/yii2-bootstrap": "~2.0.0", "yiisoft/yii2-swiftmailer": "~2.0.0 || ~2.1.0", "2amigos/yii2-usuario": "~1.0", "dmstr/yii2-adminlte-asset": "^2.1", "yiisoft/yii2-bootstrap4": "^1.0@dev", "kartik-v/yii2-grid": "dev-master", "kartik-v/yii2-widgets": "dev-master", "kartik-v/yii2-editable": "@dev", "kartik-v/yii2-date-range": "@dev", "kartik-v/yii2-tabs-x": "dev-master" }, "require-dev": { "yiisoft/yii2-debug": "~2.0.0", "yiisoft/yii2-gii": "~2.0.0", "yiisoft/yii2-faker": "~2.0.0", "codeception/base": "^2.2.3", "codeception/verify": "~0.3.1" },

EndErr avatar Jul 26 '20 16:07 EndErr

What makes you think this could be a yii2-usuario issue? I'm not a composer expert but looks like an issue with it

maxxer avatar Jul 27 '20 06:07 maxxer

I've searched where "selectize" is used and it is only in yii2-usuario

EndErr avatar Jul 27 '20 06:07 EndErr

I just ran a composer update into an old project and didn't experience any error.

maxxer avatar Jul 27 '20 07:07 maxxer

Could it be a conflict with select2 I use from kartik's extansions?

EndErr avatar Jul 27 '20 08:07 EndErr

Unlikely.

I'd try deleting composer.lock or something like that and running install again. Do at your own risk :)

maxxer avatar Jul 27 '20 12:07 maxxer

instead of selectize you can use choices.min.js

for tags (or other multiple)

<?= $form->field($model, 'items')->listBox($availableItems, ['id' => 'children', 'multiple' => true, 'size' => 12]) ?>

jQuery(function ($) { function selectToChoices() { $('select').each(function () { let element = $(this).get(0), shouldSort = true, searchEnabled = false, removeItemButton = false; if ($(this).attr('multiple')) { removeItemButton = true; } if ($(this).attr('search')) { searchEnabled = true; } if ($(this).attr('no-sort')) { shouldSort = false; } new Choices(element, { allowHTML: true, shouldSort: shouldSort, searchEnabled: searchEnabled, searchPlaceholderValue: 'Search...', removeItemButton: removeItemButton, classNames: { containerInner: 'choices__inner form-control' } }); }); } $(document).on("pjax:end", function() { selectToChoices(); }); selectToChoices(); })

scorpsan avatar Jun 14 '22 10:06 scorpsan