question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

import config in _app raises https://err.sh/vercel/next.js/invalid-page-config

See original GitHub issue

Bug 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:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
prakharshukla321commented, Sep 2, 2020

I’d like to work on this issue. May I give it a shot?

0reactions
balazsorban44commented, Jan 29, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found