<p>The solution was to replace all references to <code>"reference":null</code> with  <code>"reference":""</code> in <code>/craft/vendor/composer/installed.json</code>.</p>

CC BY-SA 4.0
2018-08-22T00:56:43.067Z
2018-08-22T00:56:43.067Z
Tyssen
<p>I'm attempting my first Craft plugin and trying to update <a href="https://github.com/matthewattanasio/Craft-Url-Decoder-Twig-Extension" rel="nofollow noreferrer">https://github.com/matthewattanasio/Craft-Url-Decoder-Twig-Extension</a> for Craft 3 and followed the instructions in the <a href="https://docs.craftcms.com/v3/extend/plugin-guide.html#loading-your-plugin-into-a-craft-project" rel="nofollow noreferrer">docs for loading plugins</a> which seemed to work in that the plugin appeared in the control panel, but I also got the following error:</p>

<blockquote>
  <p>[UnexpectedValueException]
    Package cakephp/core's source key should be specified as {"type": ..., "url": ..., "reference": ...},
    {"type":"git","url":"https://github.com/cakephp/core.git","reference":null} given.</p>
</blockquote>

<p>and now when I try to run any more composer commands I get the same error so I'm unable to do</p>

<pre><code>composer remove package/name
composer require package/name
</code></pre>

<p>because I've made some changes to file names and need to update it.</p>

<p>The plugin is still showing in the CP but showing old information and when I try to install it, I get a server error.</p>

<plugin-development><twigextension>
UnexpectedValueException after loading plugin
# UnexpectedValueException after loading plugin

(Asked by: username_0 on 2018-08-21)

I'm attempting my first Craft plugin and trying to update https://github.com/matthewattanasio/Craft-Url-Decoder-Twig-Extension for Craft 3 and followed the instructions in the docs for loading plugins which seemed to work in that the plugin appeared in the control panel, but I also got the following error:

[UnexpectedValueException]
    Package cakephp/core's source key should be specified as {"type": ..., "url": ..., "reference": ...},
    {"type":"git","url":"https://github.com/cakephp/core.git","reference":null} given.

and now when I try to run any more composer commands I get the same error so I'm unable to do
composer remove package/name
composer require package/name

because I've made some changes to file names and need to update it.
The plugin is still showing in the CP but showing old information and when I try to install it, I get a server error.

**Tags:** plugin-development, twigextension


---

## 1 answers

### Answer by username_0 on 2018-08-22. Score: 1

The solution was to replace all references to `"reference":null` with `"reference":""` in `/craft/vendor/composer/installed.json`.


---

