0

How to solve this qwik framework error during build a static site:

   ReferenceError: exports is not defined in ES module scope
    at file:///media/oem/MyFiles/8_DEVELOPMENT/nexasoft/server/@qwik-city-plan.mjs:1:1097
    at ModuleJob.run (node:internal/modules/esm/module_job:192:25)

And the reference is about this line of code,

exports.__esModule=!0;var K=require("@builder.io/qwik"),Le=require("../components/header/header");exports.default=K.component$(function(){return React.createElement(React.Fragment,null,React.createElement("main",null,React.createElement(Le.default,null),...

I am facing this issue since I update my dependencies with Qwik V1

I try this, <script>var exports = {};</script>, but still trow me an error.

This is my project repository: https://github.com/Maikpwwq/nexasoft

Maik col
  • 31
  • 4
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community May 23 '23 at 06:14

1 Answers1

0

I cloned your project and I reinstalled the dependencies from scratch.
I commented the mongoose logics here src/routes/customer-record/index.tsx because I don't have the database to test that part.
The SSG building process is working correctly.

Giorgio Boa
  • 341
  • 4