Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

build failed on vite typescript #2895

Open
yasineh opened this issue Jan 8, 2025 · 2 comments
Open

build failed on vite typescript #2895

yasineh opened this issue Jan 8, 2025 · 2 comments

Comments

@yasineh
Copy link

yasineh commented Jan 8, 2025

Describe the bug

Screenshot 2025-01-15 at 13 06 02

preview js fail on opening with the following errors:
Build failed with 3 errors: (define name):1:0: ERROR: Expected identifier but found "import" (define name):1:0: ERROR: Expected identifier but found "import" (define name):1:0: ERROR: Expected identifier but found "import" at failureErrorWithLog (/.vscode/extensions/zenclabs.previewjs-1.30.0/dist/node_modules/.pnpm/esbuild@0.24.1/node_modules/esbuild/lib/main.js:1476:15) at //.vscode/extensions/zenclabs.previewjs-1.30.0/dist/node_modules/.pnpm/esbuild@0.24.1/node_modules/esbuild/lib/main.js:945:25 at runOnEndCallbacks (//.vscode/extensions/zenclabs.previewjs-1.30.0/dist/node_modules/.pnpm/esbuild@0.24.1/node_modules/esbuild/lib/main.js:1316:45) at buildResponseToResult (//.vscode/extensions/zenclabs.previewjs-1.30.0/dist/node_modules/.pnpm/esbuild@0.24.1/node_modules/esbuild/lib/main.js:943:7) at //.vscode/extensions/zenclabs.previewjs-1.30.0/dist/node_modules/.pnpm/esbuild@0.24.1/node_modules/esbuild/lib/main.js:970:16 at responseCallbacks.<computed> (//.vscode/extensions/zenclabs.previewjs-1.30.0/dist/node_modules/.pnpm/esbuild@0.24.1/node_modules/esbuild/lib/main.js:622:9) at handleIncomingPacket (//.vscode/extensions/zenclabs.previewjs-1.30.0/dist/node_modules/.pnpm/esbuild@0.24.1/node_modules/esbuild/lib/main.js:677:12) at Socket.readFromStdout (//.vscode/extensions/zenclabs.previewjs-1.30.0/dist/node_modules/.pnpm/esbuild@0.24.1/node_modules/esbuild/lib/main.js:600:7) at Socket.emit (node:events:520:28) at addChunk (node:internal/streams/readable:559:12)

Reproduction

open preview js on any component on in browser

Preview.js version

1.30.0

Framework

React 18.2.0

System Info

System:
    OS: macOS 15.1.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 189.69 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.7.0 - /opt/homebrew/bin/node
    npm: 10.8.2 - /opt/homebrew/bin/npm
    pnpm: 9.9.0 - /opt/homebrew/bin/pnpm
  IDEs:
    VSCode: 1.96.2 - /usr/local/bin/code
    Vim: 9.0 - /usr/bin/vim
  Browsers:
    Chrome: 131.0.6778.264
    Safari: 18.1.1

Used Package Manager

pnpm

Extension logs (useful for crashes)

No response

Preview logs (useful for rendering errors)

Failed to load resource: the server responded with a status of 404 (Not Found)

Repo link (if available)

No response

Anything else?

No response

@benoitlahoz
Copy link

benoitlahoz commented Jan 16, 2025

Same here width shadcn-vue component and vue 3.5.13 and vite 6.0.2... Too sad...

@fwouts
Copy link
Owner

fwouts commented Jan 16, 2025

Could either of you please provide a sample repo to reproduce the issue?

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants