-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
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
Error running dev server in WSL2 Docker.
docker-compose:
frontend:
build: .
command: npm run dev
volumes:
- ./:/frontend
ports:
- '8080:8080'
Dockerfile:
FROM node:lts-alpine
WORKDIR /frontend
COPY package*.json ./
RUN npm install
COPY . .
CMD ["npm", "run", "dev"]
vite.config.js:
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
server: {
host: true,
port: 8080
}
})
Reproduction
https://github.com/sshiling/Vite-Vue-Docker-WSL2-Bug
System Info
System:
OS: Linux 4.19 Ubuntu 20.04 LTS (Focal Fossa)
CPU: (1) x64 Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
Memory: 129.67 MB / 979.44 MB
Container: Yes
Shell: 5.8 - /usr/bin/zsh
Binaries:
Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node
Yarn: 1.22.5 - /usr/bin/yarn
npm: 6.14.15 - /usr/bin/npm
Used Package Manager
npm
Logs
frontend_1 | vite v2.7.13 dev server running at:
frontend_1 |
frontend_1 | > Local: http://localhost:8080/
frontend_1 | > Network: http://172.19.0.2:8080/
frontend_1 |
frontend_1 | ready in 259ms.
frontend_1 |
frontend_1 | 2:31:01 PM [vite] Internal server error: EACCES: permission denied, stat '/root/.node_modules/plugin-vue:export-helper'
frontend_1 | Plugin: vite:import-analysis
frontend_1 | File: /frontend/src/App.vue
frontend_1 | at Object.statSync (node:fs:1536:3)
frontend_1 | at isDirectory (/frontend/node_modules/resolve/lib/sync.js:31:23)
frontend_1 | at loadNodeModulesSync (/frontend/node_modules/resolve/lib/sync.js:200:17)
frontend_1 | at Function.resolveSync [as sync] (/frontend/node_modules/resolve/lib/sync.js:107:17)
frontend_1 | at resolveFrom$3 (/frontend/node_modules/vite/dist/node/chunks/dep-f5552faa.js:3911:29)
frontend_1 | at resolvePackageData (/frontend/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30046:19)
frontend_1 | at /frontend/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30426:15
frontend_1 | at Array.find (<anonymous>)
frontend_1 | at tryNodeResolve (/frontend/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30425:44)
frontend_1 | at Context.resolveId (/frontend/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30257:28)
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.
Mighty683, willidert, ant32t, DleiaDev, nyko28 and 5 more
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)