You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current behavior is that when I try to build my Next.js application, I encounter a TypeScript error in the src/app/layout.tsx file that says "Cannot find module '../../../../src/app/layout' or its corresponding type declarations". This prevents the build process from completing successfully and I am unable to deploy my application.
Expected Behavior
The expected behavior is that I should be able to build my Next.js application without encountering a TypeScript error in the src/app/layout.tsx file. The build process should complete successfully. This would allow me to deploy my application as intended.
GitHub Repo
No response
Steps to Reproduce
Create a next.js application that uses the app directory.
npx nx build appName --skip-nx-cache
> NX --skip-nx-cache disables the connection to Nx Cloud for the current run.
The remote cache will not be read from or written to during this run.
> nx run appName:build:production
warn - You have enabled experimental feature (appDir) in next.config.js.
warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
info - Thank you for testing `appDir` please leave your feedback at https://nextjs.link/app-feedback
info - Compiled successfully
info - Skipping linting
info - Checking validity of types ...Failed to compile.
src/app/layout.tsx
Type error: Cannot find module '../../../../src/app/layout' or its corresponding type declarations.
——————————————————————————————————————————————————————————————————————————————————————————————————
> NX Ran target build for project appName (9s)
✖ 1/1 failed
✔ 0/1 succeeded [0 read from cache]
error Command failed with exit code 1.
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Solution
#14558 (comment)
Current Behavior
The current behavior is that when I try to build my Next.js application, I encounter a TypeScript error in the src/app/layout.tsx file that says "Cannot find module '../../../../src/app/layout' or its corresponding type declarations". This prevents the build process from completing successfully and I am unable to deploy my application.
Expected Behavior
The expected behavior is that I should be able to build my Next.js application without encountering a TypeScript error in the src/app/layout.tsx file. The build process should complete successfully. This would allow me to deploy my application as intended.
GitHub Repo
No response
Steps to Reproduce
nx build appName
Nx Report
Failure Logs
Additional Information
No response
The text was updated successfully, but these errors were encountered: