-
Notifications
You must be signed in to change notification settings - Fork 337
Permission denied (os error 13) #1925
Comments
Hi @bramses - do you recall how you installed |
Hi @nilslice thanks for getting back. Initially I installed wrangler to my global npm, but I uninstalled that version and reinstalled with
but it still wants sudo for everything |
Hi @nilslice, just following up on this! |
@bramses If you've used
If you create a new project in a new directory, without using |
Thanks for the comment! Tried starting a new wrangler worker from scratch and still got permission errors, output below:
Both
|
These permissions errors aren't from the installation process (which is where using Make sure the We'd like to do better here, but it's potentially a breaking change. More details in #1863 (that issue is specifically about the cache directory, but it's a problem for other files wrangler creates) |
Just checked this is what came back from
Couldn't find
|
how about inside |
So good news/bad news: Good news: running your suggestion on
Bad news:
worker.js is owned by user it seems though
|
Still running into this issue for my local Cloudflare Workers, but the new ones seem to not require For posterity, this is what helped:
|
🐛 Bug report
Describe the bug
For any wrangler command, I get a permission error if I don't run
sudo
. Im using nvm as my node manager.Reproduce the bug
% wrangler dev
⚠️ Specifying the same KV namespace ID for both preview and production sessions may cause bugs in your production worker! Proceed with caution.
Warning: webpack's output filename is being renamed to worker.js because of requirements from the Workers runtime
/Users/bram/Library/Caches/.wrangler/wranglerjs-1.16.0/index.js:100
throw err;
^
[Error: EACCES: permission denied, open './dist/worker.js'] {
errno: -13,
code: 'EACCES',
syscall: 'open',
path: './dist/worker.js'
}
Error: failed to execute
"/Users/bram/.nvm/versions/node/v16.2.0/bin/node" "/Users/bram/Library/Caches/.wrangler/wranglerjs-1.16.0" "--output-file=/var/folders/qy/2h97wl010rlb1ls9tp_d73qc0000gn/T/.wranglerjs_outputOW0dJ" "--wasm-binding=WASM_MODULE" "--webpack-config=webpack.config.js"
: exited with exit code: 1Expected behavior
Successful dev load 🤷
Environment and versions
wrangler -V
: 👷 ✨ wrangler 1.16.0node -v
: v16.2.0The text was updated successfully, but these errors were encountered: