import config in _app raises https://err.sh/vercel/next.js/invalid-page-config
See original GitHub issueBug report
Describe the bug
I use the package @fortawesome/fontawesome-svg-core
and since nextjs 9.5.3 it causes an error, due to this code in _app
:
import { config } from '@fortawesome/fontawesome-svg-core';
config.autoAddCss = false;
The error:
error - ./pages/_app.js
Error: C:\Projects\nextapp\pages\_app.js: Invalid page config export found. Expected object but got import in file \pages\_app.js. See: https://err.sh/vercel/next.js/invalid-page-config
Is this behavior expected?
Workaround
An alias named import solves the issue:
import { config as fontawesomeConfig } from '@fortawesome/fontawesome-svg-core';
fontawesomeConfig.autoAddCss = false;
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:10 (3 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’d like to work on this issue. May I give it a shot?
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.