Next.js Discord

Discord Forum

Default export is missing

Unanswered
Scottish Fold posted this in #help-forum
Open in Discord
Scottish FoldOP
npm run build

> web@0.1.0 build
> next build

  ▲ Next.js 14.2.3

   Creating an optimized production build ...
 ✓ Compiled successfully
 ✓ Linting and checking validity of types    
   Collecting page data  .Error: Default export is missing in "C:\Users\Uporabnik\Documents\Portfolio\web\app\(components)\icon.tsx"
    at 1071 (C:\Users\Uporabnik\Documents\Portfolio\web\.next\server\app\(components)\icon-o6j1uz\route.js:1:876)
    at t (C:\Users\Uporabnik\Documents\Portfolio\web\.next\server\webpack-runtime.js:1:127)
    at o (C:\Users\Uporabnik\Documents\Portfolio\web\.next\server\app\(components)\icon-o6j1uz\route.js:1:2149)
    at C:\Users\Uporabnik\Documents\Portfolio\web\.next\server\app\(components)\icon-o6j1uz\route.js:1:2180
    at t.X (C:\Users\Uporabnik\Documents\Portfolio\web\.next\server\webpack-runtime.js:1:1191)
    at C:\Users\Uporabnik\Documents\Portfolio\web\.next\server\app\(components)\icon-o6j1uz\route.js:1:2162
    at Object.<anonymous> (C:\Users\Uporabnik\Documents\Portfolio\web\.next\server\app\(components)\icon-o6j1uz\route.js:1:2207)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)

> Build error occurred
Error: Failed to collect page data for /icon-o6j1uz
    at C:\Users\Uporabnik\Documents\Portfolio\web\node_modules\next\dist\build\utils.js:1268:15
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  type: 'Error'
}
   Collecting page data  .

How do I fix this issue? From what I can tell the file has a default export but the build command error claims it doesnt?

3 Replies

please dont bump then delete the bump message
Scottish FoldOP
i didn't mean to, i tagged the ai but realized that there is a ai forum
Show your file structure and the icon.tsx file @Scottish Fold