nextjs - 💡(How to fix) Fix Error while building Next.js 16.1.6 (Turbopack) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#92947Fetched 2026-04-18 05:51:19
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
closed ×1commented ×1issue_type_added ×1labeled ×1

Error Message

Before any change in jsconfig file it was giving me 47 error But then i changed jsconfig file and now it is giveing me 7 error

Code Example

/usr/bin/docker buildx build --build-arg NEXT_PUBLIC_API_URL= --build-arg NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY= --cache-from type=gha --cache-to type=gha,mode=max --file frontend_new/Dockerfile --iidfile /home/runner/work/_temp/docker-actions-toolkit-lUVB2L/build-iidfile-635e108acd.txt --platform linux/amd64 --attest type=provenance,mode=min,inline-only=true,builder-
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/lalwanikamaldev/AIMarketPlace/actions/runs/24579399764/job/71873020909

To Reproduce

I am building next js app for production , till last month build was fine , working well with changing any version .

This month when i started building , it get failed .

Issue is it is not able to resolve few alias 11 | import { loadRazorpay, getRazorpayKeyId } from '@/lib/razorpay'

#19 9.157 Import map: aliased to relative './src/lib/razorpay' inside of [project]/

Before any change in jsconfig file it was giving me 47 error

But then i changed jsconfig file and now it is giveing me 7 error { "compilerOptions": { "baseUrl": ".", "paths": { "@/": [ "./src/" ]
} } }

Intersting part is , it is able to resolve the allias for 8 | import { getStripe } from '@/lib/stripe' which is exactly in same sub folder lib

But not for import { loadRazorpay, getRazorpayKeyId } from '@/lib/razorpay'

<img width="1374" height="544" alt="Image" src="https://github.com/user-attachments/assets/898b2c0d-b6ae-42e2-895d-ebae6816f185" />

Current vs. Expected behavior

i am expected all the alias should resolve after updating jsconfig file { "compilerOptions": { "baseUrl": ".", "paths": { "@/": [ "./src/" ]
} } }

But it is resolve only few and remaming as it is

<img width="1374" height="544" alt="Image" src="https://github.com/user-attachments/assets/12965592-9e36-4ab7-a78c-b163c453ffb4" />

Provide environment information

/usr/bin/docker buildx build --build-arg NEXT_PUBLIC_API_URL= --build-arg NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY= --cache-from type=gha --cache-to type=gha,mode=max --file frontend_new/Dockerfile --iidfile /home/runner/work/_temp/docker-actions-toolkit-lUVB2L/build-iidfile-635e108acd.txt --platform linux/amd64 --attest type=provenance,mode=min,inline-only=true,builder-

Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local)

Additional context

No response

extent analysis

TL;DR

The issue can be resolved by verifying the file system and import statements for consistency, ensuring that all alias paths in the jsconfig file are correctly configured.

Guidance

  • Review the file system to ensure that the razorpay and stripe files are in the same directory and have the same file extensions, as the issue seems to be specific to the razorpay import.
  • Verify that the jsconfig file is correctly configured, and the paths option is set up to alias @/lib/* to ./src/lib/*.
  • Check for any typos or inconsistencies in the import statements, as the error message indicates that some aliases are being resolved while others are not.
  • Try to isolate the issue by creating a minimal reproducible example, focusing on the import statements and the jsconfig file configuration.

Example

No code snippet is provided as the issue seems to be related to the project configuration and file system rather than a specific code snippet.

Notes

The issue may be related to the way the jsconfig file is being used or the file system structure, but without more information, it's difficult to provide a more specific solution. The fact that some aliases are being resolved while others are not suggests that the issue may be related to the specific files or directories being imported.

Recommendation

Apply workaround: Verify the file system and import statements for consistency, and ensure that all alias paths in the jsconfig file are correctly configured, as this is the most likely cause of the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

nextjs - 💡(How to fix) Fix Error while building Next.js 16.1.6 (Turbopack) [1 comments, 2 participants]