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
In environments that make files non-writable like Bazel, builds break with
Failed to compile.
./src/<file>.css
Global CSS cannot be imported from files other than your Custom <App>. Please move all global CSS imports to pages/_app.js. Or convert the import to Component-Level CSS (CSS Modules).
Read more: https://nextjs.org/docs/messages/css-global
Location: src/pages/_app.tsx
Not sure why to check if a file is writable in the findPageFile function, but it looks like we should check if it exists instead of checking if it is writable there.
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 28, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Next.js are you using?
10.2.0
What version of Node.js are you using?
14.15
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
Other
Describe the Bug
In environments that make files non-writable like Bazel, builds break with
This is due to checking if pages/_app
isWritable
:next.js/packages/next/server/lib/find-page-file.ts
Line 34 in 0af3b52
which ends up making
customAppFile = null
even when the file exists.Is there a reason to check if file is writable and not just if it exists?
Expected Behavior
Expected build not to fail even if pages/_app is not writable
To Reproduce
Remove write permission on
pages/_app
:The text was updated successfully, but these errors were encountered: