You are here

Wunderkraut Sweden Blog: Adding a external JavaScript library to composer

Error message

User error: Failed to connect to memcache server: localhost:11212 in dmemcache_object() (line 415 of /home/freedrup/public_html/demo/d7/sites/all/modules/memcache/

Some module require that you download external Javascript-libraries, and in drupal 8 that should be done in Composer. 

The module Masonry require the JavaScript library with the same name. So we need to include the package in composer.json, like:

"type": "package",
"package": {
"name": "desandro/masonry",
"version": "master",
"type": "drupal-library",
"dist": {
"url": "",
"type": "file"

And in the require part that is:


And then we need to add libraries in extra part of we do not have that:

"type:drupal-library… Read More