Error while building,
Hello,
i followed the shadcn docs for tanstack start, in dev mode it works but when i run build i get following error:
Any recommendations how to debug?
Its on M4 Mac with Node v22.12.0 and pnpm Version 10.6.5
Many thanks in advice
📦 Compiling ssr router...
vinxi building router ssr in http mode
vite v6.2.3 building SSR bundle for production...
✓ 374 modules transformed.
✗ Build failed in 1.36s
[20:17:15] ERROR [commonjs--resolver] node_modules/.pnpm/fsevents@2.3.3/node_modules/fsevents/fsevents.node (1:0): Unexpected character '�' (Note that you need plugins to import files that are not JavaScript)
file: /Users/marcelwolf/code/Wille/weraniq-dashboard/node_modules/.pnpm/fsevents@2.3.3/node_modules/fsevents/fsevents.node:1:0 (/Users/marcelwolf/code/Wille/weraniq-dashboard/node_modules/.pnpm/chokidar@3.6.0/node_modules/chokidar/index.js)
1: ����@<�
��*...
^
4*
h���/System/Library/Frameworks/CoreFoundation.framework/Versions...
3: ���H��1�H���L���L���H�����L�E�L��H��1�����uH�E�H�[A^A_]��}f.�UH��AWAVSPI��H��I��H�H...
at getRollupError (node_modules/.pnpm/rollup@4.37.0/node_modules/rollup/dist/es/shared/parseAst.js:397:41)
at ParseError.initialise (node_modules/.pnpm/rollup@4.37.0/node_modules/rollup/dist/es/shared/node-entry.js:14219:28)
at convertNode (node_modules/.pnpm/rollup@4.37.0/node_modules/rollup/dist/es/shared/node-entry.js:16113:10)
at convertProgram (node_modules/.pnpm/rollup@4.37.0/node_modules/rollup/dist/es/shared/node-entry.js:15356:12)
at Module.setSource (node_modules/.pnpm/rollup@4.37.0/node_modules/rollup/dist/es/shared/node-entry.js:17101:24)
at async ModuleLoader.addModuleSource (node_modules/.pnpm/rollup@4.37.0/node_modules/rollup/dist/es/shared/node-entry.js:21045:13)
[cause]: Unexpected character '�'
📦 Compiling ssr router...
vinxi building router ssr in http mode
vite v6.2.3 building SSR bundle for production...
✓ 374 modules transformed.
✗ Build failed in 1.36s
[20:17:15] ERROR [commonjs--resolver] node_modules/.pnpm/fsevents@2.3.3/node_modules/fsevents/fsevents.node (1:0): Unexpected character '�' (Note that you need plugins to import files that are not JavaScript)
file: /Users/marcelwolf/code/Wille/weraniq-dashboard/node_modules/.pnpm/fsevents@2.3.3/node_modules/fsevents/fsevents.node:1:0 (/Users/marcelwolf/code/Wille/weraniq-dashboard/node_modules/.pnpm/chokidar@3.6.0/node_modules/chokidar/index.js)
1: ����@<�
��*...
^
4*
h���/System/Library/Frameworks/CoreFoundation.framework/Versions...
3: ���H��1�H���L���L���H�����L�E�L��H��1�����uH�E�H�[A^A_]��}f.�UH��AWAVSPI��H��I��H�H...
at getRollupError (node_modules/.pnpm/rollup@4.37.0/node_modules/rollup/dist/es/shared/parseAst.js:397:41)
at ParseError.initialise (node_modules/.pnpm/rollup@4.37.0/node_modules/rollup/dist/es/shared/node-entry.js:14219:28)
at convertNode (node_modules/.pnpm/rollup@4.37.0/node_modules/rollup/dist/es/shared/node-entry.js:16113:10)
at convertProgram (node_modules/.pnpm/rollup@4.37.0/node_modules/rollup/dist/es/shared/node-entry.js:15356:12)
at Module.setSource (node_modules/.pnpm/rollup@4.37.0/node_modules/rollup/dist/es/shared/node-entry.js:17101:24)
at async ModuleLoader.addModuleSource (node_modules/.pnpm/rollup@4.37.0/node_modules/rollup/dist/es/shared/node-entry.js:21045:13)
[cause]: Unexpected character '�'
2 Replies
optimistic-gold•6mo ago
seems to try to import a native module as a JS file?
conscious-sapphireOP•6mo ago
Is there any debug Option to See Where This Happens?
Solved it - it was a wrong Import - some z from vinx instead of zod