jurassiscripts / velociraptor

The npm-style script runner for Deno

Home Page:https://velociraptor.run

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to upgrade vr

DheerajKN opened this issue · comments

When I am trying to upgrade vr. This is the error, I'm facing

error: Uncaught (in promise) PermissionDenied: Requires net access to "cdn.deno.land", run again with the --allow-net flag
    const res = await fetch(
                      ^
    at Object.opSync (deno:core/01_core.js:149:12)
    at opFetch (deno:ext/fetch/26_fetch.js:66:17)
    at mainFetch (deno:ext/fetch/26_fetch.js:199:61)
    at deno:ext/fetch/26_fetch.js:425:11
    at new Promise (<anonymous>)
    at fetch (deno:ext/fetch/26_fetch.js:392:12)
    at Function.sortedVersions (https://pptkwtismwjswyniwwx3z7bu67wzsjknnmqs3zo5vmd4vr7fqswq.arweave.net/e-arTRJlkythqLWvvPw09-2ZJU1rIS3l3asHysflhK0/lib/registries/DenoLand.ts:16:23)
    at Function.latestVersion (https://pptkwtismwjswyniwwx3z7bu67wzsjknnmqs3zo5vmd4vr7fqswq.arweave.net/e-arTRJlkythqLWvvPw09-2ZJU1rIS3l3asHysflhK0/lib/registries/Registry.ts:19:31)
    at UpgradeCommand.fn (https://deno.land/x/velociraptor@1.2.0/src/cli/commands/upgrade.ts:17:39)
    at UpgradeCommand.execute (https://deno.land/x/cliffy@v0.19.3/command/command.ts:997:18)

Deno Version:
deno 1.18.2 (release, x86_64-apple-darwin)
v8 9.8.177.6
typescript 4.5.2

MacOS: 12.2.1

Hey @DheerajKN, are you updating through the vr upgrade command?
Can you share the contents of the velociraptor launcher?

$ cat ~/.deno/bin/vr
#!/bin/sh
# generated by deno install
exec deno run --allow-read --allow-env --allow-run 'https://deno.land/x/velociraptor/cli.ts' "$@"

Adding --allow-net to the script. Did the trick.

Yes, that's because you installed vr with limited permissions. See Installation to know the correct install command and the how permissions are used by vr. You can use the --reload flag to override the existing installation.