-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Closed
Labels
Description
Describe the bug
when I run test or vite in preserve-symlinks directory, a syntax error occurs in linked.js and build fails.
Reproduction
this repository, run pnpm dev in packages/playground/preserve-symlinks
System Info
System:
OS: Windows 10 10.0.19041
CPU: (16) x64 AMD Ryzen 7 4800U with Radeon Graphics
Memory: 7.51 GB / 14.87 GB
Binaries:
Node: 16.10.0 - D:\ide\node\node.EXE
Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.0.0 - D:\ide\node\npm.CMD
Browsers:
Edge: Spartan (44.19041.1023.0), Chromium (94.0.992.38)
Internet Explorer: 11.0.19041.1202Used Package Manager
pnpm
Logs
vite:config no config file found. +0ms
vite:config using resolved config: {
vite:config root: 'D:/code/WebstromProjects/vite/packages/playground/preserve-symlinks',
vite:config base: '/',
vite:config mode: 'development',
vite:config configFile: undefined,
vite:config logLevel: undefined,
vite:config clearScreen: undefined,
vite:config server: { force: true, fs: { strict: undefined, allow: [Array] } },
vite:config configFileDependencies: [],
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: { force: true, fs: [Object] }
vite:config },
vite:config resolve: { dedupe: undefined, alias: [ [Object], [Object] ] },
vite:config publicDir: 'D:\\code\\WebstromProjects\\vite\\packages\\playground\\preserve-symlinks\\public',
vite:config cacheDir: 'D:\\code\\WebstromProjects\\vite\\packages\\playground\\preserve-symlinks\\node_modules\\.vite',
vite:config command: 'serve',
vite:config isProduction: false,
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:define',
vite:config 'vite:css-post',
vite:config 'vite:client-inject',
vite:config 'vite:import-analysis'
vite:config ],
vite:config build: {
vite:config target: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
vite:config polyfillModulePreload: true,
vite:config outDir: 'dist',
vite:config assetsDir: 'assets',
vite:config assetsInlineLimit: 4096,
vite:config cssCodeSplit: true,
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 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 createResolver: [Function: createResolver],
vite:config optimizeDeps: {
vite:config esbuildOptions: { keepNames: undefined, preserveSymlinks: undefined }
vite:config }
vite:config } +6ms
vite:deps Crawling dependencies using entries:
vite:deps D:/code/WebstromProjects/vite/packages/playground/preserve-symlinks/index.html +0ms
vite:resolve 1.04ms /src/main.js -> D:/code/WebstromProjects/vite/packages/playground/preserve-symlinks/src/main.js +0ms
vite:resolve 4.12ms @symlinks/moduleA -> D:/code/WebstromProjects/vite/packages/playground/preserve-symlinks/moduleA/linked.js +7ms
> moduleA/linked.js:1:0: error: Unexpected "."
1 │ ./src/index.js
╵ ^
error when starting dev server:
Error: Build failed with 1 error:
moduleA/linked.js:1:0: error: Unexpected "."
at failureErrorWithLog (D:\code\WebstromProjects\vite\node_modules\.pnpm\esbuild@0.13.2\node_modules\esbuild\lib\main.js:1493:15)
at D:\code\WebstromProjects\vite\node_modules\.pnpm\esbuild@0.13.2\node_modules\esbuild\lib\main.js:1151:28
at runOnEndCallbacks (D:\code\WebstromProjects\vite\node_modules\.pnpm\esbuild@0.13.2\node_modules\esbuild\lib\main.js:941:63)
at buildResponseToResult (D:\code\WebstromProjects\vite\node_modules\.pnpm\esbuild@0.13.2\node_modules\esbuild\lib\main.js:1149:7)
at D:\code\WebstromProjects\vite\node_modules\.pnpm\esbuild@0.13.2\node_modules\esbuild\lib\main.js:1258:14
at D:\code\WebstromProjects\vite\node_modules\.pnpm\esbuild@0.13.2\node_modules\esbuild\lib\main.js:629:9
at handleIncomingPacket (D:\code\WebstromProjects\vite\node_modules\.pnpm\esbuild@0.13.2\node_modules\esbuild\lib\main.js:726:9)
at Socket.readFromStdout (D:\code\WebstromProjects\vite\node_modules\.pnpm\esbuild@0.13.2\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/vue-next 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.