Skip to content

Conversation

@serhalp
Copy link
Member

@serhalp serhalp commented Oct 15, 2025

Summary

Error: There was a problem setting up the Edge Functions environment. To try a manual installation,
visit https://ntl.fyi/install-deno.

This happens a lot: https://github.com/netlify/cli/issues?q=is%3Aissue%20%22There%20was%20a%20problem%20setting%20up%20the%20Edge%20Functions%20environment%22. It confuses and blocks our users and leads to frequent bug reports that are difficult for us to troubleshoot.

It means we failed to download, install, or execute a local deno binary, or we're trying to use one that doesn't behave as expected or match the expected version range.

This error message is imprecise and not very actionable.

This PR bubbles the previously swallowed error details, adds more info, and adds a recommended step that has been found to unblock users and which I've personally used to unblock myself.

@serhalp serhalp force-pushed the fix/actionable-dev-deno-cli-errors branch 2 times, most recently from 4440025 to 3865a70 Compare October 16, 2025 21:35
@serhalp serhalp changed the title fix: throw precise, actionable error instead of There was a problem setting up the Edge Functions environment fix: throw precise, actionable error when downloaded deno cli is unusable Oct 17, 2025
```
Error: There was a problem setting up the Edge Functions environment. To try a manual installation,
visit https://ntl.fyi/install-deno.
```

This happens _a lot_:
https://github.com/netlify/cli/issues?q=is%3Aissue%20%22There%20was%20a%20problem%20setting%20up%20the%20Edge%20Functions%20environment%22.

It means we failed to download, install, or execute a local deno binary, or we're trying to use one
that doesn't behave as expected or match the expected version range.

This error message is imprecise and not very actionable.

This commit bubbles the previously swallowed error details, adds more info, and adds a recommended
step that [has been found to unblock
users](netlify/cli#7700 (comment)) and which I've personally
used to unblock myself.
@serhalp serhalp force-pushed the fix/actionable-dev-deno-cli-errors branch from 3865a70 to 3f7574a Compare October 17, 2025 11:09
Downloaded to: ${binaryPath}
Platform: ${process.platform}/${process.arch}
This may be caused by permissions, antivirus software, or platform incompatibility.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line could be better 🤔

Comment on lines +97 to +98
Try clearing the Deno cache directory and retrying:
${this.cacheDirectory}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided not to bother dynamically producing a platform-specific command here. I think users can figure out how to delete a directory.

if (!version) {
this.logger.system(`getBinaryVersion no version found. binaryPath ${binaryPath}`)
return
return { error: new Error('Could not parse Deno version from output') }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we include the full stdout here...?

@serhalp serhalp marked this pull request as ready for review October 17, 2025 12:18
@serhalp serhalp requested a review from a team as a code owner October 17, 2025 12:18
@serhalp serhalp enabled auto-merge (squash) October 21, 2025 12:14
@serhalp serhalp merged commit 27c4d71 into main Oct 21, 2025
36 checks passed
@serhalp serhalp deleted the fix/actionable-dev-deno-cli-errors branch October 21, 2025 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants