# Trellis Deploy Staging Composer Fails, Referencing Old .env Variables

**URL:** https://discourse.roots.io/t/trellis-deploy-staging-composer-fails-referencing-old-env-variables/20253
**Category:** trellis
**Tags:** trellis-cli
**Created:** 2021-03-01T18:55:17Z
**Posts:** 3

## Post 1 by @jesstucker — 2021-03-01T18:55:17Z

Having some composer dependency update problems on a staging site.

Seems that it is referencing old .env variables that no longer exist in the current `site/composer.json`

If I run `ansible-playbook deploy.yml -e env=staging -e site=mysite.com --limit=kinsta_staging -vvvv` it seems to be pulling from outdated “releases” directory on staging, e.g. `~/public/releases/20210301183854/composer.json` or `composer.lock` .e.g.:

```
kinsta_staging]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "apcu_autoloader": false,
            "arguments": "",
            "classmap_authoritative": true,
            "command": "install",
            "executable": null,
            "global_command": false,
            "ignore_platform_reqs": false,
            "no_dev": true,
            "no_plugins": false,
            "no_scripts": true,
            "optimize_autoloader": true,
            "prefer_dist": false,
            "prefer_source": false,
            "working_dir": "/www/mysite_466/public/releases/20210301183854"
        }
    },
```

And the error is something like:  
`[FFraenz\\PrivateComposerInstaller\\Exception\\MissingEnvException] \n Can't resolve placeholder {%WP_ALL_EXPORT_PRO_URL}. Environment variable 'WP_ALL_EXPORT_PRO_URL' is not set.`

The updated `composer.json` / `composer.lock` no longer uses this env variable.

Is there a way to clear this out / force the build to use the one updated in version control?

Sincerely,  
Jess

---

## Post 2 by @jesstucker — 2021-03-01T19:45:27Z

Seems that my `site/vendor/composer/installed.json` wasn’t matching my `site/composer.json` `site/composer.lock`. Instead the `installed.json` had the old stuff, causing the build to fail. Removing it and making composer rebuild it seemed to work.

---

## Post 3 by @Twansparant — 2021-06-17T13:43:38Z

May I ask how to get this `WP_ALL_EXPORT_PRO_URL` url?  
Can’t find it in the docs anywhere, I just purchased the pro plugin but can’t get it to work with Composer 2.  
Thanks!
