Open q351941406 opened 1 month ago
ganzhengwei@ganzhenweisMini ArtifexAIbot % denoflare serve main ✅ Granted all import access. Compiling https://raw.githubusercontent.com/skymethod/denoflare/v0.6.0/cli-webworker/worker.ts into worker contents... ✅ Granted all write access. TS0: error: unexpected argument '--config' found
Usage: deno bundle [OPTIONS]
at undefined: error: Uncaught (in promise) Error: bundle failed throw new Error('bundle failed'); ^ at bundle (https://raw.githubusercontent.com/skymethod/denoflare/v0.6.0/cli/bundle.ts:108:15) at eventLoopTick (ext:core/01_core.js:175:7) at async Function.start (https://raw.githubusercontent.com/skymethod/denoflare/v0.6.0/cli/worker_manager.ts:40:43) at async createLocalRequestServer (https://raw.githubusercontent.com/skymethod/denoflare/v0.6.0/cli/cli_serve.ts:161:35) at async Object.serve [as handler] (https://raw.githubusercontent.com/skymethod/denoflare/v0.6.0/cli/cli_serve.ts:194:32) at async CliCommand.routeSubcommand (https://raw.githubusercontent.com/skymethod/denoflare/v0.6.0/cli/cli_command.ts:104:13) at async https://raw.githubusercontent.com/skymethod/denoflare/v0.6.0/cli/cli.ts:41:5 ganzhengwei@ganzhenweisMini ArtifexAIbot %
You can use esbuild
as the bundle backend. That was added recently, so for the moment there's no tag/release with those changes
A workaround is to use the commit hash for the installation, something like
deno install --global --allow-import=cdn.skypack.dev:443,raw.githubusercontent.com:443,deno.land:443 \
--allow-write --unstable-worker-options --allow-read --allow-net --allow-env --allow-run \
--name denoflare --force https://raw.githubusercontent.com/skymethod/denoflare/3a875145982d0b288dd864cb2ef1e00552b59cae/cli/cli.ts
Then you can use
denoflare serve main --bundle 'backend=esbuild'
I tested that using deno 2.0.2
@soyantonio Thank you, it is already usable. I hope Denoflare can fix this bug soon,Therefore, I will not close this issue until it is fixed.
deno install
fails for denoflare CLI with --unstable-worker-options
and permission flags
When attempting to install the denoflare CLI using the command provided in the documentation:
deno install --unstable-worker-options --allow-read --allow-net --allow-env --allow-run --name denoflare --force \
https://raw.githubusercontent.com/skymethod/denoflare/v0.6.0/cli/cli.ts
I encounter the following error:
error: the following required arguments were not provided:
--global
Note: Permission flags can only be used in a global setting
It seems that using --unstable-worker-options
in conjunction with permission flags like --allow-read
requires the --global
flag, which is not mentioned in the installation instructions.
Steps to Reproduce:
deno install
command as shown above.Expected Behavior:
The denoflare CLI should install successfully without requiring the --global
flag when using --unstable-worker-options
and permission flags.
Actual Behavior:
The installation fails with the error message indicated above.
Environment:
deno -v
)Additional Context:
This issue may be related to how Deno handles permissions in combination with --unstable-worker-options
. Clarification in the documentation or a fix in the installation script would be appreciated.
https://github.com/skymethod/denoflare-docs/blob/HEAD/cli/index.md#installation
deno 2.0 denoflare 6