Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

createServer have a bug #13991

Closed
7 tasks done
1739616529 opened this issue Jul 31, 2023 · 3 comments
Closed
7 tasks done

createServer have a bug #13991

1739616529 opened this issue Jul 31, 2023 · 3 comments

Comments

@1739616529
Copy link

1739616529 commented Jul 31, 2023

Describe the bug

I ran a js file through node to start vite but it reported an error

Reproduction

https://stackblitz.com/edit/vitejs-vite-4yfru7

Steps to reproduce

No response

System Info

system: windows 10 x64 ltsc 21H2 19044.3208

Used Package Manager

npm

Logs

~/projects/vitejs-vite-4yfru7
❯ npm install && npm run dev

added 49 packages in 6s

7 packages are looking for funding
run npm fund for details

[email protected] dev
esno ./.dev/run.js

➜ Local: http://localhost:3333/
➜ Network: use --host to expose
__name is not defined
15:37:31 [vite] Internal server error: __name is not defined
Plugin: vite:vue
File: /home/projects/vitejs-vite-4yfru7/src/App.vue
at SortTemplate (eval at _0x326f78 (https://vitejsvite4yfru7-rqa2.w-corp.staticblitz.com/blitz.bec01ace.js:42:351884), :3:107)
at cloneSort (file:///home/projects/vitejs-vite-4yfru7/node_modules/source-map-js/lib/quick-sort.js:2:892)
at exports.quickSort (file:///home/projects/vitejs-vite-4yfru7/node_modules/source-map-js/lib/quick-sort.js:2:1101)
at BasicSourceMapConsumer.SourceMapConsumer_parseMappings [as _parseMappings] (file:///home/projects/vitejs-vite-4yfru7/node_modules/source-map-js/lib/source-map-consumer.js:2:10514)
at BasicSourceMapConsumer.get [as _generatedMappings] (file:///home/projects/vitejs-vite-4yfru7/node_modules/source-map-js/lib/source-map-consumer.js:2:1045)
at BasicSourceMapConsumer.SourceMapConsumer_eachMapping [as eachMapping] (file:///home/projects/vitejs-vite-4yfru7/node_modules/source-map-js/lib/source-map-consumer.js:2:2256)
at mapLines (file:///home/projects/vitejs-vite-4yfru7/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:14:466)
at doCompileTemplate (file:///home/projects/vitejs-vite-4yfru7/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:13:2410)
at Object.compileTemplate (file:///home/projects/vitejs-vite-4yfru7/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:13:1053)
at compile (file:///home/projects/vitejs-vite-4yfru7/node_modules/@vitejs/plugin-vue/dist/index.cjs:167:35)
^C

~/projects/vitejs-vite-4yfru7 1m 1s

Validations

@stackblitz
Copy link

stackblitz bot commented Jul 31, 2023

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@1739616529
Copy link
Author

oh! is vue3.3.2 bug
vuejs/core#8303

@sapphi-red
Copy link
Member

This seems to be a limitation of tsx (esno): privatenumber/tsx#113

Closing as this is more related to tsx and Vue rather than Vite.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants