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
Hello!
I'm tring run ssr in exist project laravel+inertia+react(typescript). All made by https://inertiajs.com/server-side-rendering.
Run "npm run build" without error, but when I started "php artisan inertia:start-ssr", I get error:
file:///F:/Projects/php/laravel/myproj/bootstrap/ssr/ssr.js:12
import { MathJaxContext, MathJax } from "better-react-mathjax";
^^^^^^^
SyntaxError: Named export 'MathJax' not found. The requested module 'better-react-mathjax' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'better-react-mathjax';
const { MathJaxContext, MathJax } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:122:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:188:5)
at async DefaultModuleLoader.import (node:internal/modules/esm/loader:228:24)
at async loadESM (node:internal/process/esm_loader:40:7)
at async handleMainPromise (node:internal/modules/run_main:66:12)
Node.js v20.5.1
I tried remove MathJax from project, but get the same error about another package.
Hello!
I'm tring run ssr in exist project laravel+inertia+react(typescript). All made by https://inertiajs.com/server-side-rendering.
Run "npm run build" without error, but when I started "php artisan inertia:start-ssr", I get error:
I tried remove MathJax from project, but get the same error about another package.
My ssr.jsx:
app.tsx:
vite.config.js
tsconfig.json:
app.blade.php:
composer.json:
package.json:
What I do wrong? Thank you!
The text was updated successfully, but these errors were encountered: