# Using Doppler with a monorepo in netlify

**URL:** <https://community.doppler.com/t/using-doppler-with-a-monorepo-in-netlify/1165>\
**Category:** Need Help\
**Tags:** integration\
**Created:** [May 25, 2023, 10:18pm UTC](https://community.doppler.com/t/using-doppler-with-a-monorepo-in-netlify/1165 "2023-05-25T22:18:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaedag](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/jaedag/32/789_2.png) [@jaedag](https://community.doppler.com/u/jaedag)\
**Post date:** [May 25, 2023, 10:18pm UTC](https://community.doppler.com/t/using-doppler-with-a-monorepo-in-netlify/1165/1 "2023-05-25T22:18:57Z")

</div>

I’m trying to use doppler in my production environment in netlify on which I am deploying a monorepo with a frontend and multiple functions (three of them) which are in the folders

/api/src/functions/  
/web-react-ts/  
/api/

But the doppler environment variables are showing up in the frontend web-react-ts. but in the functions folder, the functions don’t seem to have access to the env variables. What could be the reason.

This is the build command I’m running

```auto
npm run doppler-install && npm i && cd api && npm i && cd ../web-react-ts && npm i && cd .. && ./doppler setup --no-interactive --token $DOPPLER_TOKEN_PRD && ./doppler run --token $DOPPLER_TOKEN_PRD --command='npm run build && cp api/src/resolvers/texts.json api/build/resolvers/. && cp -r api/build/schema api/build/functions/graphql/. && cd api/src/functions/graphql && npm I'

```

---

<div class="post-metadata">

**Author:** ![watsonian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/watsonian/32/267_2.png) [@watsonian](https://community.doppler.com/u/watsonian)\
**Post date:** [May 26, 2023, 3:34pm UTC](https://community.doppler.com/t/using-doppler-with-a-monorepo-in-netlify/1165/2 "2023-05-26T15:34:22Z")

</div>

Hi @jaedag!

We’ve been discussing this already in the support ticket you opened, but I’ll reply here as well in case it helps anyone else!

The best option here is to use our [Netlify integration](https://docs.doppler.com/docs/netlify) to sync secrets over to Netlify. This would avoid needing to use our CLI at all. In your case, this isn’t possible due to some of your secrets exceeding the 4kb size limit Netlify has.

To get around the 4kb limit issue, one option is to use our [gitops-secrets-nodejs](https://github.com/DopplerHQ/gitops-secrets-nodejs) package. There’s a blog post that discusses using this to get around a similar limit on Vercel that should be applicable here:

> **[Working around Vercel’s 4KB Environment Variables Limit for Node.js -...](https://softwareengineeringdaily.com/2022/04/11/working-around-vercels-4kb-environment-variables-limit-for-node-js-with-gitops-secrets/)**
>
> Learn how to bring a GitOps encrypted secrets workflow to your Vercel Node.js applications to make the 4KB environment variable limit a thing of the past.

If none of those work, then I’ll need some elaboration on exactly how it’s failing. Are the variables not showing up inside the `npm run build` task? That seems to be the only operation that’s happening inside the `doppler run` command outside of copying files around and performing an `npm install`.

Regards,  
-Joel
