[Bug]: Setting nextjs.appDirectory
to true
causes error on 7.6.0
#25016
Labels
nextjs.appDirectory
to true
causes error on 7.6.0
#25016
Describe the bug
When upgrading from 7.5.3 to 7.6.0, I noticed that all my components are throwing an error:
Downgrading to 7.5.3 fixes the issue.
When attempting to
To Reproduce
There are some stories that import components dependent on the app router feature of Next.js. On versions 7.5.3 and below, this works without any issue:
However, after upgrading to 7.6.0, any attempts to load any story will lead to this error:
You can see a live example of this error here: https://stackblitz.com/edit/github-i8rkrx-6doqzc
Downgrading to 7.5.3 will cause this issue to go away: https://stackblitz.com/edit/github-i8rkrx-8encmk
System
Additional context
Removing
nextjs.appDirectory: true
will fix this warning, but it will cause all stories that import components that consume the app router to throw a new error:The text was updated successfully, but these errors were encountered: