When I run npm run build
on Vercel
and Heroku
, I encounter an error that does not occur on my local computer:
The error message is
Module not found: Can't resolve './Page.module.css'
I am trying to import this file from app/page.tsx
, and both files are located in the same directory with matching cases. Here is a screenshot for reference:
https://i.sstatic.net/LzWo8.png
The line in page.tsx
causing the issue is:
'use client'
import styles from "./Page.module.css"
The next.config.js
file only contains environment variables. The package.json
and webpack settings remain untouched.