-
Notifications
You must be signed in to change notification settings - Fork 334
npm install -g @cloudflare/wrangler Error: EACCES: permission denied, mkdir #1517
Comments
This closed issue is related #240 and it also suggested modifying the documentation to indicate nvm is a requirement. Installation instructions still lacking nvm here: https://github.com/cloudflare/wrangler Installation instructions still lacking nvm here: https://developers.cloudflare.com/workers/ Installation instructions include the following incorrect step:
Installation instructions need to include the following detail instead of leading user to believe it will work to install npm using a binary global package: "NOTE: MUST USE a Node.js version manager or configure root or default system account permissions manually (possible but complicated, not recommended)." |
Created PR cloudflare/cloudflare-docs-engine#191 |
Created PR #1518 |
As a new user to Cloudflare Workers, this really threw me for a loop. It's only in this thread that I've found nvm is a requirement. I use n to manage node versions so it's a bit of a pain too. |
This bit us really hard for our CI containers, which just install nodejs and don't use nvm. We had to resort to installing wrangler via cargo which was a bit of a pain. |
closing since it looks like the docs PR has been merged to recommend nvm as part of onboarding on the docs site. @iandelahorne I think #1780 may be of interest to you, which allows you to configure exactly where you want to install wrangler which should be useful for CI. |
🐛 Bug Report
NOTE:
Please fill out each section below before submitting your 🐛 bug report.
Before opening a new issue, please:
BUG REPORT TEMPLATE PROBLEM:
404 NOT FOUND on https://workers.cloudflare.com/docs/quickstart/updating-the-cli/
Environment
rustc -V
: rustc 1.45.2node -v
: v14.8.0wrangler -V
: 👷 ✨ wrangler 1.11.0 (after successful installation)wrangler.toml
Steps to reproduce
https://nodejs.org/en/download/
$ sudo npm install -g @cloudflare/wrangler
$ wrangler -V
#803 (comment)
$ nvm ls
-> v14.8.0
system
default -> node (-> v14.8.0)
node -> stable (-> v14.8.0) (default)
stable -> 14.8 (-> v14.8.0) (default)
Downloading and installing node v14.8.0...
Downloading https://nodejs.org/dist/v14.8.0/node-v14.8.0-darwin-x64.tar.xz...
############################################################################################################### 100.0%
Computing checksum with shasum -a 256
Checksums matched!
Now using node v14.8.0 (npm v6.14.7)
Creating default alias: default -> node (-> v14.8.0)
$ which npm
/Users/jasoncoombs/.nvm/versions/node/v14.8.0/bin/npm
$ npm install -g @cloudflare/wrangler
/Users/jasoncoombs/.nvm/versions/node/v14.8.0/bin/wrangler -> /Users/jasoncoombs/.nvm/versions/node/v14.8.0/lib/node_modules/@cloudflare/wrangler/run-wrangler.js
Downloading release https://workers.cloudflare.com/get-npm-wrangler-binary/1.11.0/x86_64-apple-darwin
wrangler has been installed!
added 34 packages from 21 contributors in 3.732s
$ wrangler -V
👷 ✨ wrangler 1.11.0
The text was updated successfully, but these errors were encountered: