- Issue created by @bobburns
- Status changed to Fixed
over 1 year ago 8:08pm 4 May 2023 - πͺπΈSpain rodrigoaguilera Barcelona
Thanks for the report. Can you try the dev version of the module to confirm?
- πΊπΈUnited States bobburns
It now enables without error, but I still get
Drupal\libraries\ExternalLibrary\Exception\LibraryDefinitionNotFoundException: The library definition for the library 'caret.js' could not be found. in Drupal\libraries\ExternalLibrary\Definition\ChainDefinitionDiscovery->getDefinition() (line 56 of modules/libraries/src/ExternalLibrary/Definition/ChainDefinitionDiscovery.php).
Drupal\libraries\ExternalLibrary\LibraryManager->load('caret.js') (Line: 293)
atjs_requirements('runtime') (Line: 52)
Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler::Drupal\hook_event_dispatcher\{closure}(Object, 'atjs') (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('requirements', Object) (Line: 67)
Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler->invokeAllWith('requirements', Object) (Line: 59)
Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler->invokeAll('requirements', Array) (Line: 109)
. . . moreI am trying to figure out how to use a library from the local filesystem as the readme says
Currently the module implements a plugin for the JsDelivr CDN
and another for local libraries in the `/libraries` folder.I have this in my module.libraries.yml
drupal.caret.js
remote: http://ichord.github.com/Caret.js
repo: ichord/Caret.js
description: "Add Github like mentions autocomplete to your application."
version: 0.3.1
license:
name: MIT
gpl-compatible: true
js:
/libraries/caret.js/dist/js/jquery.caret.min.js: {}
/libraries/caret.js/dist/js/jquery.caret.js: { minified: true }libraries_provider:
enabled: true
source: LibrarySourceBasedependencies:
- core/jquery
- core/drupal
- core/drupalSettings
- core/onceDo I have something wrong in the source syntax or call or way off base elsewhere ??
- πͺπΈSpain rodrigoaguilera Barcelona
That seems like an exception for the "libraries" module, not this one.
I don't understand the line where you specify LibrarySourceBase as the source.
For an example you can look at bulmajs library definition:
https://git.drupalcode.org/project/drulma/-/blob/2.x/drulma.libraries.ym... - πΊπΈUnited States bobburns
LibrarySourceBase.php appeared to be the plugin for library discovery
Going to cdn. jsdelivr.net goes to jsdelivr.com reveals the format for github is gh instead of npm like this
https://cdn.jsdelivr.net/gh/@ichord/At.js/tree/master/dist/js/jquery.atw... {}
or something like this
after several tries of various configurations nothing worked so I will have to wait and see if the libraries maintainers answer
Automatically closed - issue fixed for 2 weeks with no activity.