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
I'm having issues trying to import the StartServer function from "@tanstack/react-start". Sadly, my project isn't configured to use es modules. As a workaround, I'm trying to import the UMD build, but got this error:
[start] node:internal/modules/cjs/loader:571
[start] throw e;
[start] ^
[start]
[start] Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './build/umd/index.production' is not defined by "exports" in /[redacted]/node_modules/@tanstack/react-start/package.json
[start] at new NodeError (node:internal/errors:399:5)
[start] at exportsNotFound (node:internal/modules/esm/resolve:361:10)
[start] at packageExportsResolve (node:internal/modules/esm/resolve:697:9)
[start] at resolveExports (node:internal/modules/cjs/loader:565:36)
[start] at Module._findPath (node:internal/modules/cjs/loader:634:31)
[start] at Module._resolveFilename (node:internal/modules/cjs/loader:1061:27)
[start] at Hook.Module.require (/[redacted]/node_modules/dd-trace/packages/dd-trace/src/ritm.js:54:29)
[start] at require (node:internal/modules/cjs/helpers:110:18)
[start] at @tanstack/react-start/build/umd/index.production (/[redacted]/dist/server.js:2423:18)
[start] at __webpack_require__ (/[redacted]/dist/server.js:3250:41) {
[start] code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
[start] }
[start]
[start] Node.js v18.16.0
Is there a workaround for this issue? I'm trying to follow this guide (https://tanstack.com/router/v1/docs/guide/ssr) to achieve SSR with tanstack-router and my react app but unfortunately it seems a bit outdated, also the examples in the docs don't seem to be working.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm having issues trying to import the
StartServer
function from"@tanstack/react-start"
. Sadly, my project isn't configured to use es modules. As a workaround, I'm trying to import the UMD build, but got this error:Is there a workaround for this issue? I'm trying to follow this guide (https://tanstack.com/router/v1/docs/guide/ssr) to achieve SSR with tanstack-router and my react app but unfortunately it seems a bit outdated, also the examples in the docs don't seem to be working.
Beta Was this translation helpful? Give feedback.
All reactions