I have a problem recently. That is, Mac OS can't read and write when it is plugged into NTFS format mobile hard disk, and then it finds that some file system prompts are occupied by Mac OS and can't be opened. Every time I need to execute the command to mount it manually... Then I can't accept the lazy cancer, so I developed a small tool with Electron. Because of the electronic vuw used before, the built-in version is Electron 2.x, which doesn't support Mac OS dark mode Yes, I'm going to try to use Electron 7.x. I found that all kinds of installations are not available!!
> firstname.lastname@example.org postinstall /Users/key/Source/WebStormProjects/hdi-manager/node_modules/electron > node install.js (node:34913) UnhandledPromiseRejectionWarning: HTTPError: Response code 404 (Not Found) at EventEmitter.emitter.on.response (/Users/key/Source/WebStormProjects/hdi-manager/node_modules/got/source/as-stream.js:35:24) at EventEmitter.emit (events.js:198:13) at module.exports (/Users/key/Source/WebStormProjects/hdi-manager/node_modules/got/source/get-response.js:22:10) at ClientRequest.handleResponse (/Users/key/Source/WebStormProjects/hdi-manager/node_modules/got/source/request-as-event-emitter.js:155:5) at Object.onceWrapper (events.js:286:20) at ClientRequest.emit (events.js:203:15) at ClientRequest.origin.emit.args [as emit] (/Users/key/Source/WebStormProjects/hdi-manager/node_modules/@szmarczak/http-timer/source/index.js:37:11) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:556:21) at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17) at TLSSocket.socketOnData (_http_client.js:442:20) (node:34913) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:34913) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. npm WARN email@example.com No repository field.
Helpless ~ only to see the source code why not! It is found that the download address of the version after Electron 7.0.0 has an extra letter v, and then 404 will be installed and downloaded
npm install -g cross-env cross-env npm_config_electron_mirror="https://npm.taobao.org/mirrors/electron/" npm_config_electron_custom_dir="7.1.10" npm install
Then it's OK!