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

electron_use_remote_checksums Syntax Error #939

Open
z4rathustr4 opened this issue Sep 26, 2024 · 1 comment
Open

electron_use_remote_checksums Syntax Error #939

z4rathustr4 opened this issue Sep 26, 2024 · 1 comment

Comments

@z4rathustr4
Copy link

Hello, I'm using WSL2 to test the project, when I run npm i inside electron-quick-start I get the following error:

npm ERR! code 1
npm ERR! path /home/z4rathustr4/electron-adblock/electron-quick-start/node_modules/electron
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! /home/z4rathustr4/electron-adblock/electron-quick-start/node_modules/electron/install.js:45
npm ERR!   checksums: process.env.electron_use_remote_checksums ?? process.env.npm_config_electron_use_remote_checksums ? undefined : require('./checksums.json'),
npm ERR!                                                         ^
npm ERR!
npm ERR! SyntaxError: Unexpected token '?'
npm ERR!     at wrapSafe (internal/modules/cjs/loader.js:915:16)
npm ERR!     at Module._compile (internal/modules/cjs/loader.js:963:27)
npm ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
npm ERR!     at Module.load (internal/modules/cjs/loader.js:863:32)
npm ERR!     at Function.Module._load (internal/modules/cjs/loader.js:708:14)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
npm ERR!     at internal/main/run_main_module.js:17:47

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/z4rathustr4/.npm/_logs/2024-09-26T08_59_03_663Z-debug-0.log

Taking a quick peek at the logs, I've found this:

66 error /home/z4rathustr4/electron-adblock/electron-quick-start/node_modules/electron/install.js:45
66 error   checksums: process.env.electron_use_remote_checksums ?? process.env.npm_config_electron_use_remote_checksums ? undefined : require('./checksums.json'),
66 error                                                         ^
66 error
66 error SyntaxError: Unexpected token '?'
66 error     at wrapSafe (internal/modules/cjs/loader.js:915:16)
66 error     at Module._compile (internal/modules/cjs/loader.js:963:27)
66 error     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
66 error     at Module.load (internal/modules/cjs/loader.js:863:32)
66 error     at Function.Module._load (internal/modules/cjs/loader.js:708:14)
66 error     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
66 error     at internal/main/run_main_module.js:17:47

Any help is very much appreciated, if I'm doing something wrong I guess I'll find out 😄

@erickzhao
Copy link
Member

We're using the nullish coalescing operator which requires Node 14: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing

What version of Node are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants