-
Notifications
You must be signed in to change notification settings - Fork 164
[Bug]: Strict SSG build failed by circular references, "ReferenceError: Cannot access 'src_rslib_entry_' before initialization" #1922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Same here since 1.42.1, also reproduce without this ssg option. Action: https://github.com/GZCTF/website/actions/runs/13561878659/job/37906463158 |
So I upgrade to v2.0.0-alpha.0, it works fine. |
Not working for me after upgrade to v2.0.0-alpha.0, see https://aiscript.dev/ ![]() My theme: import { Layout as BasicLayout } from 'rspress/theme';
import { Content } from 'rspress/runtime';
import { HomeLayout } from './pages/index';
const Layout = () => <BasicLayout><Content /></BasicLayout>;
export default {
Layout,
HomeLayout,
};
export * from 'rspress/theme'; |
try to use named export, not export default at v2.0.0-alpha? |
Sorry, My bad. It fixed now. Thanks. |
Sorry, Rspress guys, it is introduced in #1863 and shown within I refactored route-related codes in #1863, but it did not introduce any new circular references; this circular reference was already there but had not caused any problems until I organize the imports order in #1863. 🙇🏻I'm so sorry I have removed the circular reference and it is fixed by #1922 in if anyone among you is interested in this issue, you can continue to explore it. |
Version
Details
info Rendering pages...
error Failed to load SSG bundle: /home/runner/work/aiscript-docs/aiscript-docs/doc_build/ssr/main.cjs.
error Pages render error: ReferenceError: Cannot access 'src_rslib_entry_' before initialization
at /home/runner/work/aiscript-docs/aiscript-docs/doc_build/ssr/main.cjs:67684:42
at /home/runner/work/aiscript-docs/aiscript-docs/doc_build/ssr/main.cjs:107008:3
at Object. (/home/runner/work/aiscript-docs/aiscript-docs/doc_build/ssr/main.cjs:107011:3)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at cjsLoader (node:internal/modules/esm/translators:346:17)
at ModuleWrap. (node:internal/modules/esm/translators:286:7)
at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
at async renderPages (file:///home/runner/work/aiscript-docs/aiscript-docs/node_modules/.pnpm/@RsPress+core@1.43.1_webpack@5.98.0/node_modules/@rspress/core/dist/index.js:1598:45)
at async build (file:///home/runner/work/aiscript-docs/aiscript-docs/node_modules/.pnpm/@RsPress+core@1.43.1_webpack@5.98.0/node_modules/@rspress/core/dist/index.js:1683:5)
at async CAC. (file:///home/runner/work/aiscript-docs/aiscript-docs/node_modules/.pnpm/rspress@1.43.1_webpack@5.98.0/node_modules/rspress/dist/index.js:166:5)
node:internal/process/promises:391
triggerUncaughtException(err, true /* fromPromise */);
^
ReferenceError: Cannot access 'src_rslib_entry_' before initialization
at /home/runner/work/aiscript-docs/aiscript-docs/doc_build/ssr/main.cjs:67684:42
at /home/runner/work/aiscript-docs/aiscript-docs/doc_build/ssr/main.cjs:107008:3
at Object. (/home/runner/work/aiscript-docs/aiscript-docs/doc_build/ssr/main.cjs:107011:3)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at cjsLoader (node:internal/modules/esm/translators:346:17)
at ModuleWrap. (node:internal/modules/esm/translators:286:7)
at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
at async renderPages (file:///home/runner/work/aiscript-docs/aiscript-docs/node_modules/.pnpm/@RsPress+core@1.43.1_webpack@5.98.0/node_modules/@rspress/core/dist/index.js:1598:45)
at async build (file:///home/runner/work/aiscript-docs/aiscript-docs/node_modules/.pnpm/@RsPress+core@1.43.1_webpack@5.98.0/node_modules/@rspress/core/dist/index.js:1683:5)
at async CAC. (file:///home/runner/work/aiscript-docs/aiscript-docs/node_modules/.pnpm/rspress@1.43.1_webpack@5.98.0/node_modules/rspress/dist/index.js:166:5)
Node.js v20.18.3
ELIFECYCLE Command failed with exit code 1.
Reproduce link
https://github.com/aiscriptdev/aiscript-docs/actions/runs/13720978629/job/38376189127
Reproduce Steps
See GitHub Action link
The text was updated successfully, but these errors were encountered: