Skip to content

chore(nextjs): convert next.config to CommonJS for loader compatibility#41

Open
akawolfcito wants to merge 1 commit intoalchemyplatform:mainfrom
akawolfcito:fix/nextjs-config-to-cjs
Open

chore(nextjs): convert next.config to CommonJS for loader compatibility#41
akawolfcito wants to merge 1 commit intoalchemyplatform:mainfrom
akawolfcito:fix/nextjs-config-to-cjs

Conversation

@akawolfcito
Copy link
Copy Markdown
Contributor

Description

When I run the project with yarn start, I see the following error (see attached images):

Before:
image

image

After:
image

Convert Next.js configuration file to CommonJS for compatibility with Webpack loaders:

  • Renamed next.config.jsnext.config.cjs
  • Replaced all ESM import/export with require()/module.exports
  • Loaded environment variables via require('dotenv').config()
  • Removed import.meta.url handling in favor of __dirname
  • Ensured pino-pretty is installed or marked as external to avoid missing‐module errors in the client bundle

Additional Information

Related Issues

Your ENS/address: 0x35056CD667c163552f4e1a3c767F4B9fd3E2F49f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant