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

[DEP0062] node --debug and node --debug-brk are invalid #2315

Closed
jchook opened this issue Jul 23, 2021 · 5 comments · Fixed by #2347
Closed

[DEP0062] node --debug and node --debug-brk are invalid #2315

jchook opened this issue Jul 23, 2021 · 5 comments · Fixed by #2347

Comments

@jchook
Copy link
Contributor

jchook commented Jul 23, 2021

Hello, thanks for making delta-chat. When trying to set-up a local dev environment, I ran into an issue launching electron.

  • Operating System (Linux/Mac/Windows/iOS/Android): Linux
  • Delta Chat Version: master (v1.20.3)
  • Expected behavior: Able to start electron with npm run start
  • Actual behavior: Electron exits with a deprecation notice and status 9
  • Steps to reproduce the problem:
  1. Clone the project
  2. npm ci to install dependencies
  3. npm run start to launch electron
  4. See that electron exits with status 9 and a deprecation notice

I can also reproduce by running the electron command manually:

electron . --debug --log-debug --log-to-console --disable-http-cache --translation-watch
echo $? # 9
  • Screenshots:
  • Logs:
electron: [DEP0062]: `node --debug` and `node --debug-brk` are invalid. Please use `node --inspect` and `node --inspect-brk` instead.

I temporarily solved the issue the issue by replacing the --debug flag from the start script in package.json with --inspect.

@jchook
Copy link
Contributor Author

jchook commented Jul 23, 2021

Separately I encountered this error, which prevented npm run watch from working:

> deltachat-desktop@1.20.3 watch:shared /home/jchook/forks/deltachat-desktop
> npm run watch:shared:translations

npm ERR! missing script: build:frontend:source_map_support
npm ERR!
npm ERR! Did you mean one of these?
npm ERR!     build:frontend:source-map-support
npm ERR!     build:frontend:themes
npm ERR!     build:frontend:scss

I fixed this by updating the script in package.json...

-     "watch:frontend": "npm run build:frontend:source_map_support && npm run watch:frontend:ts & npm run watch:frontend:static & npm run watch:frontend:scss",
+     "watch:frontend": "npm run build:frontend:source-map-support && npm run watch:frontend:ts & npm run watch:frontend:static & npm run watch:frontend:scss",

@Simon-Laux
Copy link
Member

which node version did you use? we only tested with version 12.

@jchook
Copy link
Contributor Author

jchook commented Jul 24, 2021

I tried node 10, 12, and 14.

Looks like --debug and --debug-brk have been deprecated since Node v7.7.0.

Also I see Node uses exit status 9 to indicate invalid arguments.

@Jikstra
Copy link
Contributor

Jikstra commented Aug 13, 2021

Is this fixed?

@Simon-Laux
Copy link
Member

strange, which version of electron are you using?
I don't get that error somehow.

Anyways, the --debug we use is not meant for node debugging but for triggering our debug logging (a shortcut for --log-debug & --log-to-console) maybe we should rename it if it conflicts with electron/node -arguments.

Simon-Laux added a commit that referenced this issue Sep 6, 2021
Simon-Laux added a commit that referenced this issue Sep 6, 2021
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 a pull request may close this issue.

3 participants