ci010 / electron-vue-next

A starter template for using vue-next with the electron.
https://ci010.github.io/electron-vue-next/
191 stars 27 forks source link

Failed to run npm run dev #75

Closed 751620780 closed 2 years ago

751620780 commented 2 years ago

I have created a new project based on electron-vue-next. After I use the npm install command to install the project dependency, I got an error when I run npm run dev, the error message shows as follower:

R:\tmp\xxx>npm install

> evd@0.0.0 postinstall R:\tmp\xxx
> node ./scripts/dev.install.js

(node:104736) UnhandledPromiseRejectionWarning: HTTPError: Response code 403 (rate limit exceeded)
    at EventEmitter.<anonymous> (R:\tmp\xxx\node_modules\got\source\as-promise.js:74:19)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:104736) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:104736) [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 optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: iconv-corefoundation@1.1.6 (node_modules\iconv-corefoundation):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for iconv-corefoundation@1.1.6: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: dmg-license@1.0.9 (node_modules\dmg-license):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for dmg-license@1.0.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

up to date in 4.747s

80 packages are looking for funding
  run `npm fund` for details
R:\tmp\xxx>npm run dev
Debugger attached.

> evd@0.0.0 dev R:\tmp\xxx
> node scripts/dev.js

Debugger attached.
R:\tmp\xxx\scripts\rollup.config.js:370
  wait = wait ?? true;
               ^

SyntaxError: Unexpected token '?'
    at wrapSafe (internal/modules/cjs/loader.js:931:16)
    at Module._compile (internal/modules/cjs/loader.js:979:27)
    at Object.require.extensions.<computed> [as .js] (R:\tmp\xxx\node_modules\rollup\dist\shared\loadConfigFile.js:540:20)
    at Module.load (internal/modules/cjs/loader.js:879:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:903:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at loadConfigFromBundledFile (R:\tmp\xxx\node_modules\rollup\dist\shared\loadConfigFile.js:548:42)
    at getDefaultFromTranspiledConfigFile (R:\tmp\xxx\node_modules\rollup\dist\shared\loadConfigFile.js:532:12)
    at async loadConfigFile (R:\tmp\xxx\node_modules\rollup\dist\shared\loadConfigFile.js:491:11)
Waiting for the debugger to disconnect...
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! evd@0.0.0 dev: `node scripts/dev.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the evd@0.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\xxxx\AppData\Roaming\npm-cache\_logs\2021-09-30T08_11_08_640Z-debug.log
Waiting for the debugger to disconnect...
ci010 commented 2 years ago

Can you try to update your node js? Maybe you can try node 14.

751620780 commented 2 years ago

Thank you for reminding me that the node version installed on my machine is too low.