Skip to content

[start/devinxi] any cloudflare target: Cannot resolve "tanstack-start-server-fn-manifest:v"  #4285

Closed
@airtonix

Description

@airtonix

Which project does this relate to?

Start

Describe the bug

gh clone Balastrong/confhub
cd confhub

install nodejs/pnpm

pnpm i
pnpm build

It works with tanstackStart({ target: "netlify" })

Change to tanstackStart({ target: "cloudflare-module" }) (or any other variation of cloudflare*

pnpm i
pnpm build

results in some variation of

confhub on git main [!?] is pkg v1.0.0 via nodejs v24.1.0 took 12s 
> pnpm build

> [email protected] build /mnt/Store/Projects/Others/confhub
> vite build

vite v6.3.5 building for production...

♻️  Generating routes...
✅ Processed routes in 95ms
✓ 2742 modules transformed.
.tanstack-start/build/client-dist/.vite/manifest.json                    8.13 kB │ gzip:   1.07 kB
.tanstack-start/build/client-dist/assets/globals-qFwBf5NC.css           37.68 kB │ gzip:   7.15 kB
.tanstack-start/build/client-dist/assets/useSuspenseQuery-Bay2iilc.js    0.17 kB │ gzip:   0.16 kB
.tanstack-start/build/client-dist/assets/layout-DSgTZFmb.js              0.17 kB │ gzip:   0.16 kB
.tanstack-start/build/client-dist/assets/chevron-left-DhgusbFB.js        0.30 kB │ gzip:   0.25 kB
.tanstack-start/build/client-dist/assets/loader-circle-CzoE4StM.js       0.31 kB │ gzip:   0.26 kB
.tanstack-start/build/client-dist/assets/map-pin-vX-d9_wT.js             0.43 kB │ gzip:   0.33 kB
.tanstack-start/build/client-dist/assets/skeleton-BsDkB0Uj.js            0.45 kB │ gzip:   0.33 kB
.tanstack-start/build/client-dist/assets/separator-BmTNHxxu.js           0.67 kB │ gzip:   0.40 kB
.tanstack-start/build/client-dist/assets/submit-1_K2QWHb.js              0.81 kB │ gzip:   0.48 kB
.tanstack-start/build/client-dist/assets/_eventId-DyGQjDcI.js            0.92 kB │ gzip:   0.54 kB
.tanstack-start/build/client-dist/assets/card-D8AoOOLS.js                1.00 kB │ gzip:   0.38 kB
.tanstack-start/build/client-dist/assets/input-j54pwyDy.js               1.05 kB │ gzip:   0.56 kB
.tanstack-start/build/client-dist/assets/badge-EvTVK2Ap.js               1.09 kB │ gzip:   0.59 kB
.tanstack-start/build/client-dist/assets/sign-in-CHBR8MUy.js             1.34 kB │ gzip:   0.72 kB
.tanstack-start/build/client-dist/assets/create-CAL4GaNn.js              1.35 kB │ gzip:   0.70 kB
.tanstack-start/build/client-dist/assets/profile-DVYArpiR.js             1.51 kB │ gzip:   0.76 kB
.tanstack-start/build/client-dist/assets/sign-up-CsAoGysN.js             1.60 kB │ gzip:   0.75 kB
.tanstack-start/build/client-dist/assets/_communityId-BFwLYQ1c.js        4.40 kB │ gzip:   1.75 kB
.tanstack-start/build/client-dist/assets/index-bGp0UP6z.js              10.47 kB │ gzip:   3.77 kB
.tanstack-start/build/client-dist/assets/calendar-DaaX_z_T.js           10.90 kB │ gzip:   4.19 kB
.tanstack-start/build/client-dist/assets/submit-form-CxOwr6Zl.js        13.68 kB │ gzip:   4.41 kB
.tanstack-start/build/client-dist/assets/form-DlcZF9rG.js               52.09 kB │ gzip:  16.03 kB
.tanstack-start/build/client-dist/assets/index-Brc9JZzw.js              57.22 kB │ gzip:  18.02 kB
.tanstack-start/build/client-dist/assets/main-CO4q6_5Z.js              593.82 kB │ gzip: 183.95 kB

(!) Some chunks are larger than 500 kB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✓ built in 3.44s
vite v6.3.5 building SSR bundle for production...
✓ 316 modules transformed.
[plugin vite:css-post] Sourcemap is likely to be incorrect: a plugin (vite:css-post) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
✓ built in 953ms
✔ Generated public .output/public                                                          nitro 9:22:35 am

 WARN  [cloudflare] Node.js compatibility is not enabled.                                   nitro 9:22:35 am

ℹ Building Nitro Server (preset: cloudflare-module, compatibility date: 2024-11-19)        nitro 9:22:35 am
node_modules/.pnpm/[email protected][email protected]/node_modules/react-error-boundary/dist/react-error-boundary.esm.js (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/[email protected][email protected]/node_modules/react-error-boundary/dist/react-error-boundary.esm.js" was ignored.
node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/sonner/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/sonner/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-avatar/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-avatar/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-switch/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-switch/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-label/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-label/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-checkbox/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-checkbox/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-dialog/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-dialog/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-select/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-select/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-hover-card/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-hover-card/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-accordion/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-accordion/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-popover/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-popover/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-presence/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-presence/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-collection/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-collection/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-menu/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-menu/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-portal/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-portal/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@radix-ui/react-focus-guards/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@radix-ui/react-focus-guards/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-focus-scope/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-focus-scope/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-popper/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-popper/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-collapsible/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-collapsible/dist/index.mjs" was ignored.
node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-roving-focus/dist/index.mjs (1:0): Module level directives cause errors when bundled, "use client" in "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@radix-ui/react-roving-focus/dist/index.mjs" was ignored.

[nitro 9:22:46 am]  ERROR  Error: Cannot resolve "tanstack-start-server-fn-manifest:v" from "/mnt/Store/Projects/Others/confhub/node_modules/.pnpm/@[email protected]/node_modules/@tanstack/start-server-core/dist/esm/server-functions-handler.js" and externals are not allowed!


undefined

error during build:
Error: Cannot resolve "tanstack-start-server-fn-manifest:v" from "/mnt/Store/Projects/Others/confhub/node_modules/.pnpm/@[email protected]/node_modules/@tanstack/start-server-core/dist/esm/server-functions-handler.js" and externals are not allowed!
    at Object.resolveId (file:///mnt/Store/Projects/Others/confhub/node_modules/.pnpm/[email protected][email protected]/node_modules/nitropack/dist/rollup/index.mjs:2013:17)
    at async PluginDriver.hookFirstAndGetPlugin (file:///mnt/Store/Projects/Others/confhub/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:22131:28)
    at async resolveId (file:///mnt/Store/Projects/Others/confhub/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:20613:26)
    at async ModuleLoader.resolveId (file:///mnt/Store/Projects/Others/confhub/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:21049:15)
    at async Object.resolveId (file:///mnt/Store/Projects/Others/confhub/node_modules/.pnpm/@[email protected][email protected]/node_modules/@rollup/plugin-commonjs/dist/es/index.js:600:10)
    at async PluginDriver.hookFirstAndGetPlugin (file:///mnt/Store/Projects/Others/confhub/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:22131:28)
    at async resolveId (file:///mnt/Store/Projects/Others/confhub/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:20613:26)
    at async ModuleLoader.resolveId (file:///mnt/Store/Projects/Others/confhub/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:21049:15)
    at async ModuleLoader.resolveDynamicImport (file:///mnt/Store/Projects/Others/confhub/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:21449:82)
    at async file:///mnt/Store/Projects/Others/confhub/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:21337:32
 ELIFECYCLE  Command failed with exit code 1.

Your Example Website or App

https://stackblitz.com/~/github.com/airtonix/confhub?file=vite.config.ts

Steps to Reproduce the Bug or Issue

pnpm i
pnpm build

Expected behavior

Build should succeed and wrangler --cwd .output/ dev should work

Screenshots or Videos

No response

Platform

  • Browser: Firefox 138.0.4 (64-bit)
   "@tanstack/react-router": "^1.121.0-alpha.14",
    "@tanstack/react-router-with-query": "^1.121.0-alpha.14",
    "@tanstack/react-start": "^1.121.0-alpha.17",
    "@tanstack/router-core": "^1.121.0-alpha.14",
x inxi -S                                    
System:
  Host: brass Kernel: 6.14.4-100.fc40.x86_64 arch: x86_64 bits: 64
  Desktop: GNOME v: 48.1 Distro: Fedora Linux 42 (Workstation Edition)

Additional context

I just forked someone elses repo https://github.com/Balastrong/confhub/ to demonstrate

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions