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

Failed to launch editor. #21330

Closed
youngvform opened this issue Jan 19, 2021 · 1 comment
Closed

Failed to launch editor. #21330

youngvform opened this issue Jan 19, 2021 · 1 comment
Labels
bug Issue was opened via the bug report template.

Comments

@youngvform
Copy link
Contributor

youngvform commented Jan 19, 2021

What version of Next.js are you using?

10.0.5

What version of Node.js are you using?

12.16.2

What browser are you using?

Chrome

What operating system are you using?

macOS

How are you deploying your application?

local next dev

Describe the Bug

If an app crashes in development after set up REACT_EDITOR=code in .env.local, i will see an error overlay with clickable file name and stack trace.
When i click on it, it won't open an editor and throw an error like this

Failed to launch editor: TypeError: editor.toLowerCase is not a function
    at Object.launchEditor (/node_modules/@next/react-dev-overlay/lib/internal/helpers/launchEditor.js:310:16)
    at /node_modules/@next/react-dev-overlay/lib/middleware.js:320:61
    at step (/node_modules/@next/react-dev-overlay/lib/middleware.js:33:23)
    at Object.next (/node_modules/@next/react-dev-overlay/lib/middleware.js:14:53)
    at fulfilled (/node_modules/@next/react-dev-overlay/lib/middleware.js:5:58)

I think this line

return shellQuote.parse(process.env.REACT_EDITOR)
return string array and toLowerCase is undefined in string array so throw error.

Expected Behavior

When i click an error overlay, it open an editor that i set up in env file.

To Reproduce

  1. Set up REACT_EDITOR in .env.local file
  2. Crash an app and click file name on error overlay
@youngvform youngvform added the bug Issue was opened via the bug report template. label Jan 19, 2021
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

2 participants