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 would like to address a couple of issues I'm encountering during the implementation of an important project. It's a microfrontends project aiming to use SSR (Server-Side Rendering), and for this purpose, I've drawn inspiration from the isomorphic-microfrontends example.
Describe the bug or question
One of the main issues I'm facing is that when using:
tsx watch --clear-screen=false --experimental-network-imports --experimental-loader @node-loader/core server/server.ts global.nodeLoader.setImportMapPromise(Promise.resolve(nodeImportMap)); <-- nodeLoader is undefined and I believe it's crucial for the rest of the flow to work, namely the import of the apps within the renderApplication and other aspects.
To Reproduce
tsx watch --clear-screen=false --experimental-network-imports --experimental-loader @node-loader/core server/server.ts and when you invoke localhost:9000 it fails with:
TypeError: Cannot read properties of undefined (reading 'setImportMapPromise')
import process from 'process';
import express from "express";
import path from "path";
import morgan from "morgan";
import { app } from "./app";
import "./static";
import "./index-html";
app.use(morgan("tiny"));
app.set("view engine", "ejs");
app.set("views", path.resolve(process.cwd(), "./server/views"));
app.use('/', express.static(path.join(process.cwd(), "./dist")))
const port = process.env.PORT || 9000;
app.listen(port);
console.log(`App is hosted at http://localhost/:${port}`);
What could I do? Are there any examples like this with these updated versions? Any incompatibility I should be aware of? Any suggested changes or alterations?
Thank you in advance!
The text was updated successfully, but these errors were encountered:
Hello, I would like to address a couple of issues I'm encountering during the implementation of an important project. It's a microfrontends project aiming to use SSR (Server-Side Rendering), and for this purpose, I've drawn inspiration from the isomorphic-microfrontends example.
Describe the bug or question
One of the main issues I'm facing is that when using:
tsx watch --clear-screen=false --experimental-network-imports --experimental-loader @node-loader/core server/server.ts
global.nodeLoader.setImportMapPromise(Promise.resolve(nodeImportMap)); <-- nodeLoader is undefined and I believe it's crucial for the rest of the flow to work, namely the import of the apps within the renderApplication and other aspects.
To Reproduce
tsx watch --clear-screen=false --experimental-network-imports --experimental-loader @node-loader/core server/server.ts and when you invoke localhost:9000 it fails with:
TypeError: Cannot read properties of undefined (reading 'setImportMapPromise')
Main Context
Node.js Version: 20.3.1
App inspired by: isomorphic-microfrontends example
Root-app:
What could I do? Are there any examples like this with these updated versions? Any incompatibility I should be aware of? Any suggested changes or alterations?
Thank you in advance!
The text was updated successfully, but these errors were encountered: