Deno: Property 'openPlugin' does not exist on type 'typeof Deno' despite --unstable flag being present in Procfile

Created on 27 May 2020  路  11Comments  路  Source: denoland/deno

deno 1.0.2 v8 8.4.300 typescript 3.9.2

When deploying locally using the following command:

deno run --allow-net --allow-write --allow-read --unstable --allow-plugin server.ts

There are no errors. Works.

When deploying to Heroku with the following inside of the Procfile:

web: deno run --allow-net=:${PORT} --allow-write --allow-read --unstable --allow-plugin --cached-only server.ts --port=${PORT}

I get the following error:

error: TS2339 [ERROR]: Property 'openPlugin' does not exist on type 'typeof Deno'. remote: return Deno.openPlugin(localPath); at https://deno.land/x/[email protected]/mod.ts:64:15

bug

Most helpful comment

Getting the same when trying to build a docker image (using mongodb client from https://deno.land/x/[email protected]/mod.ts)

FROM hayd/alpine-deno:1.0.0

EXPOSE 8000

WORKDIR /app

USER deno

COPY . . 
RUN deno cache main.ts

CMD ["run", "--allow-env", "--allow-net", "--allow-read", "--allow-write", "--allow-plugin", "--unstable", "main.ts"]

All 11 comments

I am having the same issue with plugin_prepared, yet it is happening locally and seeing your post makes me wonder...

deno 1.0.2 | v8 8.4.300 | typescript 3.9.2

Hello, same here, it work fine locally with command deno run --allow-net --allow-env --allow-write --allow-read --allow-plugin --unstable server.ts but when deploy on heroku it throw this error

remote: error: TS2339 [ERROR]: Property 'openPlugin' does not exist on type 'typeof Deno'.
remote:   return Deno.openPlugin(localPath);
remote:               ~~~~~~~~~~
remote:     at https://deno.land/x/[email protected]/mod.ts:64:15

Personally, I use https://github.com/manyuanrong/deno_mongo which requires the flag to be activated. The problem may come from the lib.

deno 1.0.2
v8 8.4.300
typescript 3.9.2

I think it's not a deno problem but rather a bad config on the heroku side because with the heroku-cli, I can execute that.

heroku run deno -L=debug run --allow-net --cached-only --allow-env --allow-write --allow-read --allow-plugin --unstable server.ts --port=${PORT} --app eth3rnit3-deno-chat

And the server then launches without error

I think it's not a deno problem but rather a bad config on the heroku side because with the heroku-cli, I can execute that.

heroku run deno -L=debug run --allow-net --cached-only --allow-env --allow-write --allow-read --allow-plugin --unstable server.ts --port=${PORT} --app eth3rnit3-deno-chat

And the server then launches without error

I tried your solution and doesn't work for me

deno 1.0.2
v8 8.4.300
typescript 3.9.2

I am also getting the same error when i am trying to deploy on Heroku. Any suggestion

Getting the same when trying to build a docker image (using mongodb client from https://deno.land/x/[email protected]/mod.ts)

FROM hayd/alpine-deno:1.0.0

EXPOSE 8000

WORKDIR /app

USER deno

COPY . . 
RUN deno cache main.ts

CMD ["run", "--allow-env", "--allow-net", "--allow-read", "--allow-write", "--allow-plugin", "--unstable", "main.ts"]

Does this issue still persist in 1.0.5?

@bartlomieju I am still getting the error on 1.0.5 I am trying to build a docker container.

Also getting this error on latest in docker.

@hayd do you think it's somehow related to the Dockerfile handling of args? I can't think of a reason why it wouldn't work 馃檮

The issue is that you need to pass --unstable to deno cache (it's the RUN layer that's failing not CMD).

- RUN deno cache main.ts
+ RUN deno cache --unstable main.ts

Edit: @bartlomieju feel free to close issues related to hayd/deno-docker and ask people to create them on that repo!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sh7dm picture sh7dm  路  3Comments

kyeotic picture kyeotic  路  3Comments

ry picture ry  路  3Comments

JosephAkayesi picture JosephAkayesi  路  3Comments

xueqingxiao picture xueqingxiao  路  3Comments