Files

257 lines
26 KiB
Plaintext
Raw Permalink Normal View History

2023-06-19 17:36:25 -07:00
scott@MacBook-Pro-6 Desktop % npm install -g @cloudflare/wrangler
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/@cloudflare
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@cloudflare'
npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@cloudflare'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/local/lib/node_modules/@cloudflare'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/scott/.npm/_logs/2023-06-19T09_56_53_005Z-debug-0.log
scott@MacBook-Pro-6 Desktop % sudo npm install -g @cloudflare/wrangler
Password:
npm WARN deprecated @cloudflare/wrangler@1.21.0: This package is for Wrangler v1.x and is no longer supported. Please visit https://www.npmjs.com/package/wrangler for Wrangler v2+.
added 22 packages in 3s
3 packages are looking for funding
run `npm fund` for details
scott@MacBook-Pro-6 Desktop % wrangler config
⛔ DEPRECATED ⛔
The version of Wrangler you are using is now deprecated.
Please update to the latest version of wrangler to prevent critical errors.
If originally installed via npm, run `npm uninstall -g @cloudflare/wrangler && npm install -g wrangler` to update to the latest version.
If originally installed via cargo, run `cargo uninstall wrangler && npm install -g wrangler`
Docs migration guide: https://developers.cloudflare.com/workers/wrangler/migration/migrating-from-wrangler-1/#update-wrangler-version
To find your API Token, go to https://dash.cloudflare.com/profile/api-tokens
and create it using the "Edit Cloudflare Workers" template.
Consider using `wrangler login` which only requires your Cloudflare username and password.
If you are trying to use your Global API Key instead of an API Token
(Not Recommended), run `wrangler config --api-key`.
Enter API Token:
bc70cf5fbbd43ab841faa22bb9b8ae67389a9
💁 Validating credentials...
Error: Authentication check failed. Please make sure your API token is correct.
⚠️ Code 6003: Invalid request headers
scott@MacBook-Pro-6 Desktop % curl -X GET "https://api.cloudflare.com/client/v4/user/tokens/verify" \
-H "Authorization: Bearer n27K9bdHXZJCUPq6jGU5F5N8okSFNQDsLvHP4u79" \
-H "Content-Type:application/json"
{"result":{"id":"1f5dd3d359342f37d9bfd5136697efd4","status":"active"},"success":true,"errors":[],"messages":[{"code":10000,"message":"This API Token is valid and active","type":null}]}% scott@MacBook-Pro-6 Desktop % wrangler config
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ ⛔ DEPRECATED ⛔ │
│ The version of Wrangler you are using is now deprecated. │
│ Please update to the latest version of wrangler to prevent critical errors. │
│ If originally installed via npm, run `npm uninstall -g @cloudflare/wrangler && npm install -g wrangler` to update to the latest version. │
│ If originally installed via cargo, run `cargo uninstall wrangler && npm install -g wrangler` │
│ Docs migration guide: https://developers.cloudflare.com/workers/wrangler/migration/migrating-from-wrangler-1/#update-wrangler-version │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ To find your API Token, go to https://dash.cloudflare.com/profile/api-tokens │
│ and create it using the "Edit Cloudflare Workers" template. │
│ │
│ Consider using `wrangler login` which only requires your Cloudflare username and password. │
│ │
│ If you are trying to use your Global API Key instead of an API Token │
│ (Not Recommended), run `wrangler config --api-key`. │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯
Enter API Token:
n27K9bdHXZJCUPq6jGU5F5N8okSFNQDsLvHP4u79
💁 Validating credentials...
Error: Permission denied (os error 13)
scott@MacBook-Pro-6 Desktop % wrangler config
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ ⛔ DEPRECATED ⛔ │
│ The version of Wrangler you are using is now deprecated. │
│ Please update to the latest version of wrangler to prevent critical errors. │
│ If originally installed via npm, run `npm uninstall -g @cloudflare/wrangler && npm install -g wrangler` to update to the latest version. │
│ If originally installed via cargo, run `cargo uninstall wrangler && npm install -g wrangler` │
│ Docs migration guide: https://developers.cloudflare.com/workers/wrangler/migration/migrating-from-wrangler-1/#update-wrangler-version │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ To find your API Token, go to https://dash.cloudflare.com/profile/api-tokens │
│ and create it using the "Edit Cloudflare Workers" template. │
│ │
│ Consider using `wrangler login` which only requires your Cloudflare username and password. │
│ │
│ If you are trying to use your Global API Key instead of an API Token │
│ (Not Recommended), run `wrangler config --api-key`. │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯
Enter API Token:
Enter API Token:
n27K9bdHXZJCUPq6jGU5F5N8okSFNQDsLvHP4u79
💁 Validating credentials...
Error: Permission denied (os error 13)💁 Validating credentials...
Error: Authentication check failed. Please make sure your API token is correct.
⚠️ Code 6003: Invalid request headers
scott@MacBook-Pro-6 Desktop % n27K9bdHXZJCUPq6jGU5F5N8okSFNQDsLvHP4u79
zsh: command not found: n27K9bdHXZJCUPq6jGU5F5N8okSFNQDsLvHP4u79
scott@MacBook-Pro-6 Desktop % 💁 Validating credentials...
zsh: command not found: 💁
scott@MacBook-Pro-6 Desktop % sudo wrangler config
Password:
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ ⛔ DEPRECATED ⛔ │
│ The version of Wrangler you are using is now deprecated. │
│ Please update to the latest version of wrangler to prevent critical errors. │
│ If originally installed via npm, run `npm uninstall -g @cloudflare/wrangler && npm install -g wrangler` to update to the latest version. │
│ If originally installed via cargo, run `cargo uninstall wrangler && npm install -g wrangler` │
│ Docs migration guide: https://developers.cloudflare.com/workers/wrangler/migration/migrating-from-wrangler-1/#update-wrangler-version │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ To find your API Token, go to https://dash.cloudflare.com/profile/api-tokens │
│ and create it using the "Edit Cloudflare Workers" template. │
│ │
│ Consider using `wrangler login` which only requires your Cloudflare username and password. │
│ │
│ If you are trying to use your Global API Key instead of an API Token │
│ (Not Recommended), run `wrangler config --api-key`. │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯
Enter API Token:
n27K9bdHXZJCUPq6jGU5F5N8okSFNQDsLvHP4u79
💁 Validating credentials...
✨ Successfully configured. You can find your configuration file at: /Users/scott/.wrangler/config/default.toml
╭────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ A new major version of wrangler is available! │
│ You can learn more about updating here: │
│ https://developers.cloudflare.com/workers/cli-wrangler/install-update#update │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────╯
scott@MacBook-Pro-6 Desktop % Users/scott/.wrangler/config/default.toml
zsh: no such file or directory: Users/scott/.wrangler/config/default.toml
scott@MacBook-Pro-6 Desktop % wrangler generate my-worker
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ ⛔ DEPRECATED ⛔ │
│ The version of Wrangler you are using is now deprecated. │
│ Please update to the latest version of wrangler to prevent critical errors. │
│ If originally installed via npm, run `npm uninstall -g @cloudflare/wrangler && npm install -g wrangler` to update to the latest version. │
│ If originally installed via cargo, run `cargo uninstall wrangler && npm install -g wrangler` │
│ Docs migration guide: https://developers.cloudflare.com/workers/wrangler/migration/migrating-from-wrangler-1/#update-wrangler-version │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
⬇️ Installing cargo-generate v0.5.0...
🔧 Creating project called `my-worker`...
✨ Done! New project created /Users/scott/Desktop/my-worker
╭────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ A new major version of wrangler is available! │
│ You can learn more about updating here: │
│ https://developers.cloudflare.com/workers/cli-wrangler/install-update#update │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────╯
scott@MacBook-Pro-6 Desktop % npm uninstall -g @cloudflare/wrangler && npm install -g wrangler
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/@cloudflare/wrangler
npm ERR! dest /usr/local/lib/node_modules/@cloudflare/.wrangler-YTQXDq6U
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/@cloudflare/wrangler' -> '/usr/local/lib/node_modules/@cloudflare/.wrangler-YTQXDq6U'
npm ERR! [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/@cloudflare/wrangler' -> '/usr/local/lib/node_modules/@cloudflare/.wrangler-YTQXDq6U'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'rename',
npm ERR! path: '/usr/local/lib/node_modules/@cloudflare/wrangler',
npm ERR! dest: '/usr/local/lib/node_modules/@cloudflare/.wrangler-YTQXDq6U'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/scott/.npm/_logs/2023-06-19T10_14_51_613Z-debug-0.log
scott@MacBook-Pro-6 Desktop % sudo npm uninstall -g @cloudflare/wrangler && npm install -g wrangler
Password:
removed 22 packages in 55ms
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /Users/scott/.npm/_cacache/content-v2/sha512/ba/97
npm ERR! errno EACCES
npm ERR!
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR!
npm ERR! To permanently fix this problem, please run:
npm ERR! sudo chown -R 501:20 "/Users/scott/.npm"
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/scott/.npm/_logs/2023-06-19T10_14_59_956Z-debug-0.log
scott@MacBook-Pro-6 Desktop % sudo chown -R 501:20 "/Users/scott/.npm"
scott@MacBook-Pro-6 Desktop % npm install -g wrangler
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/wrangler
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/wrangler'
npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/wrangler'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/local/lib/node_modules/wrangler'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/scott/.npm/_logs/2023-06-19T10_16_04_916Z-debug-0.log
scott@MacBook-Pro-6 Desktop % sudo npm install -g wrangler --unsafe-perm
npm WARN deprecated rollup-plugin-inject@3.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
added 107 packages in 25s
15 packages are looking for funding
run `npm fund` for details
scott@MacBook-Pro-6 Desktop % wrangler --version
⛅️ wrangler 3.1.0
------------------