Skip to content

Build Error in Next.js 14 with nuqs 1.17.1 - 'cache' Not Exported from 'react' #530

Answered by SergGrey1992
SergGrey1992 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, you were right! After commenting out all the code that used nuqs, the error disappeared.

However, new issues emerged, which I had to address. The main issues were:

Build optimization failed: found pages without a React Component as default export in various file paths (.src/pages/*). The solution was to recognize that the pages directory was being mistaken for routing pages. Changing pages to routes resolved this issue.

There was also a TypeScript error.

After addressing these issues, the build was successful!

Then, I decided to reintroduce the nuqs code, and to my surprise, the build continued to be successful!

Thank you so much for such a wonderful library!

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@SergGrey1992
Comment options

@SergGrey1992
Comment options

@franky47
Comment options

@SergGrey1992
Comment options

Answer selected by franky47
@franky47
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants