Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

now dev failed to find deno exacutable when deno is installed via asdf #16

Open
kt3k opened this issue Feb 12, 2020 · 3 comments
Open
Labels
bug Something isn't working waiting for response Waiting for a response from a user

Comments

@kt3k
Copy link
Contributor

kt3k commented Feb 12, 2020

If I installed deno via asdf, now dev doesn't seem working with the following error:

$ npx now dev
Now CLI 17.0.3 dev (beta) — https://zeit.co/feedback
> Creating initial build
> Success! Build completed
> Ready! Available at http://localhost:3000
unknown command: deno. Perhaps you have to reshim?
unknown command: deno. Perhaps you have to reshim?
error: bad deno executable
Unexpected bootstrap error when calling AWS_LAMBDA_RUNTIME_API /init/error:
InitException: bad deno executable
    at Lambda.<anonymous> (/Users/kt3k/s/now-deno-example/node_modules/now/dist/index.js:2:3545645)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/kt3k/s/now-deno-example/node_modules/now/dist/index.js:2:3543532)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

If I removed asdf-installed deno and installed it with the official installer script, then it worked. Maybe this isn't a issue of this tool, but do you have any idea about the cause of the above error? @lucacasonato

@lucacasonato
Copy link
Owner

The error means that deno can't be found in your path. When you install deno via asdf, can you run it yourself from the terminal you are running now dev from?

@lucacasonato lucacasonato added the bug Something isn't working label Feb 12, 2020
@kt3k
Copy link
Contributor Author

kt3k commented Feb 13, 2020

Yes, I can use deno under ~/.asdf/shims/ in the terminal and now dev from the same terminal seems failing to find it.

MacBook-Pro-4:now-deno-example kt3k$ which deno
/Users/kt3k/.asdf/shims/deno
MacBook-Pro-4:now-deno-example kt3k$ deno --version
deno 0.32.0
v8 8.1.108
typescript 3.7.2
MacBook-Pro-4:now-deno-example kt3k$ now dev
Now CLI 17.0.3 dev (beta) — https://zeit.co/feedback
> Creating initial build
> Success! Build completed
> Ready! Available at http://localhost:3000
unknown command: deno. Perhaps you have to reshim?
unknown command: deno. Perhaps you have to reshim?
error: bad deno executable
Unexpected bootstrap error when calling AWS_LAMBDA_RUNTIME_API /init/error:
InitException: bad deno executable
    at Lambda.<anonymous> (/Users/kt3k/.asdf/installs/nodejs/12.13.0/.npm/lib/node_modules/now/dist/index.js:2:3545645)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/kt3k/.asdf/installs/nodejs/12.13.0/.npm/lib/node_modules/now/dist/index.js:2:3543532)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

(Could be an issue of asdf...)

@lucacasonato
Copy link
Owner

Interesting... internally I call which deno and then create a symlink from [project root]/.now/builders/now-deno/[entry file path]/layer/bin/deno to the deno executable I found with which deno. I don't know if asdf just doesn't like its shims being symlinked. Can you check if there is a symlink at [project root]/.now/builders/now-deno/[entry file path]/layer/bin/deno and if you can run it? That might give some more insight.

@lucacasonato lucacasonato added the waiting for response Waiting for a response from a user label Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting for response Waiting for a response from a user
Projects
None yet
Development

No branches or pull requests

2 participants