Error Evaluating Next.js Code
Unanswered
Posavac Hound posted this in #help-forum
Posavac HoundOP
After updating to NextJs 15.3, I am getting the following error: ./nodemodules/.pnpm/next@15.3.1@babel+core@7.24.5_@opentelemetry+api@1.9.0_babel-plugin-react-compiler@19.0.0-be_zwjz2uszfjtfrmkutj6tv5s7wy/node_modules/next/dist/client/components/render-from-template-context.js
Error evaluating Node.js code
TypeError: 'process.env' only accepts a configurable, writable, and enumerable data descriptor
Error evaluating Node.js code
TypeError: 'process.env' only accepts a configurable, writable, and enumerable data descriptor
9 Replies
could you include any code snippets? particularly of where you're using
process.env
?Posavac HoundOP
Only client side code. For example. Using the Link component
<Link
href={
process.env.NEXT_PUBLIC_EXTERNAL_LINK ||
'#'
}
className="text-xs flex items-center gap-1 mt-2 font-medium text-blue-600 hover:text-blue-800"
target="_blank"
rel="noopener noreferrer"
>
Link
<ExternalLink className="h-3 w-3" />
</Link>
do you have that environment variable wrapped in quotes?
Posavac HoundOP
YEs
Posavac HoundOP
Additional info: next dev --turbopack fails but next dev works fine
@Posavac Hound Only client side code. For example. Using the Link component <Link
href={
process.env.NEXT_PUBLIC_EXTERNAL_LINK ||
'#'
}
className="text-xs flex items-center gap-1 mt-2 font-medium text-blue-600 hover:text-blue-800"
target="_blank"
rel="noopener noreferrer"
>
Link
<ExternalLink className="h-3 w-3" />
</Link>
American White Pelican
@Posavac Hound can you share your .env file contents here? ofc with dummy data to keep your security.
if you use the variables in quote, i think it's error.
if you use the variables in quote, i think it's error.
Posavac HoundOP
Don't think its the issue, but here
# Created by Vercel CLI
NEXT_PUBLIC_SITE_URL="http://localhost:3000"
# Get these from Stripe dashboard
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="XXX"
STRIPE_SECRET_KEY="XXX"
STRIPE_WEBHOOK_SECRET="XXX"
STRIPE_STARTER_PLAN_PRICE_ID="XXX"
# These environment variables are used for Supabase Local Dev
NEXT_PUBLIC_SUPABASE_ANON_KEY="XXX"
NEXT_PUBLIC_SUPABASE_URL="http://127.0.0.1:54321"
SUPABASE_SERVICE_ROLE_KEY="XXX"
NX_DAEMON=""
POSTGRES_DATABASE="postgres"
POSTGRES_HOST="localhost"
POSTGRES_PASSWORD="postgres"
POSTGRES_PRISMA_URL="postgresql://postgres:postgres@localhost:54322/postgres?sslmode=disable"
POSTGRES_URL="postgresql://postgres:postgres@localhost:54322/postgres?sslmode=disable"
POSTGRES_URL_NON_POOLING="postgresql://postgres:postgres@localhost:54322/postgres?sslmode=disable"
POSTGRES_USER="postgres"
# ========================= SUPABASE ==========================
SUPABASE_PROJECT_ID="XXX"
SUPABASE_ACCESS_TOKEN="XXX"
SUPBASE_DB_PASSWORD="XXX"
#========================== POCKETBASE ==========================
NEXT_PUBLIC_POCKETBASE_HOST="https://XXX.com"
POCKETBASE_HOST="https://XXX.com"
POCKETBASE_EMAIL="XXX@gmail.com"
POCKETBASE_PASSWORD="XXX"
#========================== POCKETBASE ==========================
# ======================== I18NEXUS ==========================
I18NEXUS_API_KEY="XXX"
# ========================= I18NEXUS ==========================
# ========================= STRIPE CONNECT =========================
STRIPE_CONNECT_ACCOUNT_TYPE="XXX"
STRIPE_CONNECT_APPLICATION_FEE="XXX"
# ========================== STRIPE CONNECT =========================
NEXT_PUBLIC_EXTERNAL_LINK="https://xxx.com"
Note im using Ubuntu 24
@American White Pelican <@409789037662961674> can you share your .env file contents here? ofc with dummy data to keep your security.
if you use the variables in quote, i think it's error.
Posavac HoundOP
Any update on why this might happen?