-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Vue Vite Docker WSL2. Internal server error: EACCES: permission denied, stat '/root/.node_modules/plugin-vue:export-helper' #6767
Comments
This is happening to me as well. frontend | error when starting dev server:
frontend | Error: Build failed with 11 errors:
frontend | node_modules/.pnpm/resolve@1.22.0/node_modules/resolve/lib/sync.js:31:22: error: [plugin: vite:dep-scan] EACCES: permission denied, stat '/root/.node_modules/@heroicons/react/outline/SearchIcon'
frontend | node_modules/.pnpm/resolve@1.22.0/node_modules/resolve/lib/sync.js:31:22: error: [plugin: vite:dep-scan] EACCES: permission denied, stat '/root/.node_modules/@heroicons/react/outline/SearchIcon'
frontend | node_modules/.pnpm/resolve@1.22.0/node_modules/resolve/lib/sync.js:31:22: error: [plugin: vite:dep-scan] EACCES: permission denied, stat '/root/.node_modules/@heroicons/react/outline/SearchIcon'
frontend | node_modules/.pnpm/resolve@1.22.0/node_modules/resolve/lib/sync.js:31:22: error: [plugin: vite:dep-scan] EACCES: permission denied, stat '/root/.node_modules/dayjs/plugin/relativeTime'
frontend | node_modules/.pnpm/resolve@1.22.0/node_modules/resolve/lib/sync.js:31:22: error: [plugin: vite:dep-scan] EACCES: permission denied, stat '/root/.node_modules/dayjs/plugin/relativeTime'
frontend | ...
frontend | at failureErrorWithLog (/app/client/node_modules/.pnpm/esbuild@0.13.15/node_modules/esbuild/lib/main.js:1493:15)
frontend | at /app/client/node_modules/.pnpm/esbuild@0.13.15/node_modules/esbuild/lib/main.js:1151:28
frontend | at runOnEndCallbacks (/app/client/node_modules/.pnpm/esbuild@0.13.15/node_modules/esbuild/lib/main.js:941:63)
frontend | at buildResponseToResult (/app/client/node_modules/.pnpm/esbuild@0.13.15/node_modules/esbuild/lib/main.js:1149:7)
frontend | at /app/client/node_modules/.pnpm/esbuild@0.13.15/node_modules/esbuild/lib/main.js:1258:14
frontend | at /app/client/node_modules/.pnpm/esbuild@0.13.15/node_modules/esbuild/lib/main.js:629:9
frontend | at handleIncomingPacket (/app/client/node_modules/.pnpm/esbuild@0.13.15/node_modules/esbuild/lib/main.js:726:9)
frontend | at Socket.readFromStdout (/app/client/node_modules/.pnpm/esbuild@0.13.15/node_modules/esbuild/lib/main.js:596:7)
frontend | at Socket.emit (node:events:390:28)
frontend | at addChunk (node:internal/streams/readable:315:12)
frontend exited with code 1 |
Getting the same error on Ubuntu 20.04 in combination with docker |
Downgrading to 2.6.14 works as a quick workaround but should not be the fix. @patak-dev do you have any solution? |
This works |
Getting this on |
Just tried |
same problem, but works fine on |
I still get the error with both I found a workaround, if you mount your source directory in version: '3.2'
services:
frontend:
image: node:16-alpine
working_dir: /root
volumes:
- ./frontend:/root
command: npx vite --host |
Using For context: |
It looks like this resolve#pull should be causing the problem. |
Worked for me but 'Ugh'. I ran into it by setting up a docker dev environment for a svelte kit app with vite.ssr.noExternalize option enabled for three.js |
Same here on just linux (its not WSL problem). Solved with installing 2.5 version of vite
why i'm doing frontend??? :( |
Which Node version/docker image? Also trying to get it to work and currently using |
node@16 and vite@2.6.14 combo is works. 👍 vite@2.9.1 doesn't works well in docker. It show permission denied error message in docker. 👎 |
Node@16 & Vite until version 2.7.0-beta.7 works. Vite 2.7.0-beta.8 does not work because it shows a permission denied error with docker. |
It's not an issue with resolve package. You are running container with different user than your mounted project's files owner. It breaks on vite v2.7.0-beta.8 because I don't remember where is line of code exactly, but I fixed this by running docker container with |
@patak-dev I have checked now, yes, PR fixes the issue. But I think first of all this is a problem with containerized environment, just for notice. |
I think this PR breaks native feature of Node that described here. |
@playmean I saw that in the linked resolve PR, and it looks extremely rare. For the record, we merged #7612 because the change in resolve is causing real issues without any real bug report to justify it. |
Describe the bug
Error running dev server in WSL2 Docker.
docker-compose:
Dockerfile:
vite.config.js:
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
Validations
The text was updated successfully, but these errors were encountered: