<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Why Doe</title>
    <description>The latest articles on DEV Community by Why Doe (@whydoe1234).</description>
    <link>https://dev.to/whydoe1234</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2575825%2F9aaeda0d-1315-468b-8e75-89ef06f6db65.png</url>
      <title>DEV Community: Why Doe</title>
      <link>https://dev.to/whydoe1234</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/whydoe1234"/>
    <language>en</language>
    <item>
      <title>Vercel asking for env variable I already provided...</title>
      <dc:creator>Why Doe</dc:creator>
      <pubDate>Mon, 16 Dec 2024 08:23:00 +0000</pubDate>
      <link>https://dev.to/whydoe1234/vercel-asking-for-env-variable-i-already-provided-2ln2</link>
      <guid>https://dev.to/whydoe1234/vercel-asking-for-env-variable-i-already-provided-2ln2</guid>
      <description>&lt;p&gt;Hi there, I'm new here!&lt;/p&gt;

&lt;p&gt;I've uploaded my nextjs app to vercel, cloudinary doesn't seem to throw any errors at me and is storing my images just and I can display them on the app just fine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codefile.io/f/ezzy3n1Pzd" rel="noopener noreferrer"&gt;https://codefile.io/f/ezzy3n1Pzd&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: A Cloudinary Cloud name is required, please make sure NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME is set and configured in your environment.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's where I configure my cloudinary service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {v2 as cloudinary} from "cloudinary";
//import "dotenv/config.js";
import dotenv from "dotenv"
dotenv.config();

cloudinary.config({
    cloud_name: process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME,
    api_key: process.env.NEXT_PUBLIC_CLOUDINARY_API_KEY,
    api_secret: process.env.CLOUDINARY_API_SECRET    
})

export const POST = async(request: Request) =&amp;gt; {
    const body = (await request.json()) as {paramsToSign: Record&amp;lt;string, string&amp;gt;};
    const {paramsToSign} = body;
    const signature = cloudinary.utils.api_sign_request(
        paramsToSign,
        process.env.CLOUDINARY_API_SECRET as string
    );
    return Response.json({signature});
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...and this is part of my .env file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NEXT_PUBLIC_CLOUDINARY_API_SECRET= "*****************************"
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME= "*********"
NEXT_PUBLIC_CLOUDINARY_API_KEY= "************************"
NEXT_PUBLIC_CLOUDINARY_URL= "********************************************** ****************************"

CLOUDINARY_API_SECRET= "***********************"
CLOUDINARY_CLOUD_NAME= "************"
CLOUDINARY_API_KEY= "**************"

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;keys are edited, obviously&lt;/p&gt;

&lt;p&gt;I have dotenv installed, I tried passing the environment variables both in COULDINARY_ and NEXT_PUBLIC_CLOUDINARY_ formats, doesn't work...&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>vercel</category>
      <category>cloudinary</category>
      <category>react</category>
    </item>
  </channel>
</rss>
