iview / iview/iview-cli

Windows中运行构建后的exe报错

Open
#7 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
721
Forks
139
PR merge metrics
No merged PRs in 30d

Description

通过`npm run build:win64`后运行生成的iView.exe

> [Window Title]
> Error
>
> [Main Instruction]
> A JavaScript error occured in the main process
>
> [Content]
> Uncaught Exception:
> D:\Vue\iview-cli\iView-win32-x64\resources\app\main.js:1
> (function (exports, require, module, __filename, __dirname) { const { app, BrowserWindow, Menu } = require('electron');
> ^
> SyntaxError: Unexpected token {
> at exports.runInThisContext (vm.js:53:16)
> at Module._compile (module.js:411:25)
> at Object.Module._extensions..js (module.js:446:10)
> at Module.load (module.js:353:32)
> at Function.Module._load (module.js:308:12)
> at Object. (D:\Vue\iview-cli\iView-win32-x64\resources\atom.asar\browser\lib\init.js:106:10)
> at Object. (D:\Vue\iview-cli\iView-win32-x64\resources\atom.asar\browser\lib\init.js:108:4)
> at Module._compile (module.js:428:26)
> at Object.Module._extensions..js (module.js:446:10)
> at Module.load (module.js:353:32)
>
> [确定]
>

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the Windows package with npm run build:win64 and inspect the generated resources/app/main.js at the reported syntax error. Check the Electron runtime used by the generated iView.exe and its supported JavaScript syntax; done means the packaged executable starts without the main-process exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, javascript
Domain
build-system, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.