You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, team
I encountered an issue when having a Vite-related project within my Nx workspace. The error is related to the deprecation of compiling CJS build for Node API in Vite. While removing "type": "module" from package.json resolves the issue and I can build the docusaurus documentation site, I prefer to keep it to avoid conflicts for different builds in the future.
The client-module.js file throws an error stating that require is not defined if I keep the "type:" "module" in the package.json.
The error Message:
require is not defined
at eval (client-modules.js:1:1)
at ./apps/ng-frontend-doc/.docusaurus/client-modules.js (main.js:1812:1)
at __webpack_require__ (runtime~main.js:34:32)
at fn (runtime~main.js:334:21)
at eval (App.js:7:83)
at ./node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]__esbuild@0_2x46kw3hanuzfbi7ssabq4koka/node_modules/@docusaurus/core/lib/client/App.js (main.js:23:1)
at __webpack_require__ (runtime~main.js:34:32)
at fn (runtime~main.js:334:21)
at eval (clientEntry.js:9:62)
at ./node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]__esbuild@0_2x46kw3hanuzfbi7ssabq4koka/node_modules/@docusaurus/core/lib/client/clientEntry.js (
How can I amend it or any workarounds available? Thanks.
Best Regards,
Guan Xin Wang
The text was updated successfully, but these errors were encountered:
Hi, team
I encountered an issue when having a Vite-related project within my Nx workspace. The error is related to the deprecation of compiling CJS build for Node API in Vite. While removing "type": "module" from package.json resolves the issue and I can build the docusaurus documentation site, I prefer to keep it to avoid conflicts for different builds in the future.
The client-module.js file throws an error stating that require is not defined if I keep the
"type:" "module"
in thepackage.json
.The error Message:
How can I amend it or any workarounds available? Thanks.
Best Regards,
Guan Xin Wang
The text was updated successfully, but these errors were encountered: