-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed as not planned
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Describe the bug
as per title, when running 'npm run dev' when there is '#' in the dir path vite is throwing an error
html:D:/#test/vite-project/index.html:1:7: error: Cannot read file "../..": The handle is invalid.
1 │ import "/src/main.ts"
tried with vue, svelte and vanila templates, all the same
Reproduction
https://stackblitz.com/edit/vitejs-vite-qvyvrj
System Info
System:
OS: Windows 10 10.0.19042
CPU: (32) x64 AMD Ryzen 9 5950X 16-Core Processor
Memory: 44.56 GB / 63.91 GB
Binaries:
Node: 16.13.2 - C:\Program Files\nodejs\node.EXE
npm: 8.3.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (97.0.1072.76)
Internet Explorer: 11.0.19041.1202
Used Package Manager
npm
Logs
vite:config bundled config file loaded in 53.08ms +0ms
vite:config using resolved config: {
vite:config plugins: [
vite:config 'vite:pre-alias',
vite:config 'alias',
vite:config 'vite:modulepreload-polyfill',
vite:config 'vite:resolve',
vite:config 'vite:html-inline-script-proxy',
vite:config 'vite:css',
vite:config 'vite:esbuild',
vite:config 'vite:json',
vite:config 'vite:wasm',
vite:config 'vite:worker',
vite:config 'vite:asset',
vite:config 'vite:vue',
vite:config 'vite:define',
vite:config 'vite:css-post',
vite:config 'vite:client-inject',
vite:config 'vite:import-analysis'
vite:config ],
vite:config server: {
vite:config preTransformRequests: true,
vite:config fs: { strict: true, allow: [Array], deny: [Array] }
vite:config },
vite:config define: { __VUE_OPTIONS_API__: true, __VUE_PROD_DEVTOOLS__: false },
vite:config ssr: { external: [ 'vue', '@vue/server-renderer' ] },
vite:config configFile: 'D:/#test/vite-project/vite.config.ts',
vite:config configFileDependencies: [ 'vite.config.ts' ],
vite:config inlineConfig: {
vite:config root: undefined,
vite:config base: undefined,
vite:config mode: undefined,
vite:config configFile: undefined,
vite:config logLevel: undefined,
vite:config clearScreen: undefined,
vite:config server: {}
vite:config },
vite:config root: 'D:/#test/vite-project',
vite:config base: '/',
vite:config resolve: { dedupe: undefined, alias: [ [Object], [Object] ] },
vite:config publicDir: 'D:\\#test\\vite-project\\public',
vite:config cacheDir: 'D:\\#test\\vite-project\\node_modules\\.vite',
vite:config command: 'serve',
vite:config mode: 'development',
vite:config isProduction: false,
vite:config build: {
vite:config target: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
vite:config polyfillModulePreload: true,
vite:config outDir: 'D:\\#test\\vite-project\\dist',
vite:config assetsDir: 'assets',
vite:config assetsInlineLimit: 4096,
vite:config cssCodeSplit: true,
vite:config cssTarget: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
vite:config sourcemap: false,
vite:config rollupOptions: {},
vite:config minify: 'esbuild',
vite:config terserOptions: {},
vite:config write: true,
vite:config emptyOutDir: null,
vite:config manifest: false,
vite:config lib: false,
vite:config ssr: false,
vite:config ssrManifest: false,
vite:config reportCompressedSize: true,
vite:config chunkSizeWarningLimit: 500,
vite:config watch: null,
vite:config commonjsOptions: { include: [Array], extensions: [Array] },
vite:config dynamicImportVarsOptions: { warnOnError: true, exclude: [Array] }
vite:config },
vite:config preview: {
vite:config port: undefined,
vite:config strictPort: undefined,
vite:config host: undefined,
vite:config https: undefined,
vite:config open: undefined,
vite:config proxy: undefined,
vite:config cors: undefined
vite:config },
vite:config env: { BASE_URL: '/', MODE: 'development', DEV: true, PROD: false },
vite:config assetsInclude: [Function: assetsInclude],
vite:config logger: {
vite:config hasWarned: false,
vite:config info: [Function: info],
vite:config warn: [Function: warn],
vite:config warnOnce: [Function: warnOnce],
vite:config error: [Function: error],
vite:config clearScreen: [Function: clearScreen],
vite:config hasErrorLogged: [Function: hasErrorLogged]
vite:config },
vite:config packageCache: Map(0) {},
vite:config createResolver: [Function: createResolver],
vite:config optimizeDeps: {
vite:config esbuildOptions: { keepNames: undefined, preserveSymlinks: undefined }
vite:config }
vite:config } +5ms
vite:deps Crawling dependencies using entries:
vite:deps D:/#test/vite-project/index.html +0ms
vite:resolve 0.50ms /src/main.ts -> D:/#test/vite-project/src/main.ts +0ms
> html:D:/#test/vite-project/index.html:1:7: error: Cannot read file "../..": The handle is invalid.
1 │ import "/src/main.ts"
╵ ~~~~~~~~~~~~~~
error when starting dev server:
Error: Build failed with 1 error:
html:D:/#test/vite-project/index.html:1:7: error: Cannot read file "../..": The handle is invalid.
at failureErrorWithLog (D:\#test\vite-project\node_modules\esbuild\lib\main.js:1493:15)
at D:\#test\vite-project\node_modules\esbuild\lib\main.js:1151:28
at runOnEndCallbacks (D:\#test\vite-project\node_modules\esbuild\lib\main.js:941:63)
at buildResponseToResult (D:\#test\vite-project\node_modules\esbuild\lib\main.js:1149:7)
at D:\#test\vite-project\node_modules\esbuild\lib\main.js:1258:14
at D:\#test\vite-project\node_modules\esbuild\lib\main.js:629:9
at handleIncomingPacket (D:\#test\vite-project\node_modules\esbuild\lib\main.js:726:9)
at Socket.readFromStdout (D:\#test\vite-project\node_modules\esbuild\lib\main.js:596:7)
at Socket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12)
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Plagiatus, neunato, sunjianxu and DiHand79
Metadata
Metadata
Assignees
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)