DEV Community

Discussion on: Deploy your Deno apps to Heroku

Collapse
 
wobsoriano profile image
Robert • Edited

Thanks for this. For some reason I can't make it work. I still get permission errors despite having it in my Procfile.

Here's the error:

2020-08-02T13:13:01.283479+00:00 app[web.1]: Check file:///app/index.ts
2020-08-02T13:13:06.139127+00:00 app[web.1]: INFO downloading deno plugin "deno_mongo" from "https://github.com/manyuanrong/deno_mongo/releases/download/v0.9.1/libdeno_mongo.so"
2020-08-02T13:13:06.145764+00:00 app[web.1]: error: Uncaught PermissionDenied: network access to "https://github.com/manyuanrong/deno_mongo/releases/download/v0.9.1/libdeno_mongo.so", run again with the --allow-net flag

Procfile

web: deno run --allow-net=:${PORT} --allow-read --allow-write --allow-plugin --unstable -c tsconfig.json index.ts --port=${PORT}

any idea?

Collapse
 
ms314006 profile image
Clark

You missed --allow-net flag, maybe you can edit the content of Procfile to following:

web: deno run --allow-net=:${PORT} --allow-read --allow-write --allow-plugin --allow-net --unstable -c tsconfig.json index.ts --port=${PORT}

Collapse
 
wobsoriano profile image
Robert

What? So 2 --allow-nets?

Thread Thread
 
ms314006 profile image
Clark

Sorry! It is my fault, I missed that you already had --allow-net!

But I think maybe you can change the sequence to:

web: deno run --allow-net=:${PORT} --allow-read --allow-write --allow-plugin --unstable -c index.ts tsconfig.json --port=${PORT}

You can try again. I have seen some problems occur in sequence.

Thread Thread
 
wobsoriano profile image
Robert

tsconfig.json should appear after -c though.

Collapse
 
wobsoriano profile image
Robert

Doing --allow-net instead of --allow-net=:${PORT} works.