2

我将电子添加到我的角度应用程序中,以便能够将其作为桌面应用程序运行,但我在电子锻造的“制作”步骤中遇到问题,因为我不断收到以下错误消息

这是错误消息的屏幕截图,但我也将其粘贴在下面

我很困惑,因为我实际上不知道这里提到的路径太长了。是我的文件所在的目录还是我的项目的名称?

angular_node_express.nuspec(我在整个项目中找不到名为的文件)

电子锻造

✔ Checking your system
✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing to Package Application for arch: x64
✔ Preparing native dependencies
✔ Packaging Application
Making for the following targets: squirrel
✖ Making for target: squirrel - On platform: win32 - For arch: x64

An unhandled error has occurred inside Forge:
An error occured while making for target: squirrel
Failed with exit code: 1
Output:
Attempting to build package from 'angular_node_express.nuspec'.
The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 
characters.

Error: Failed with exit code: 1
Output:
Attempting to build package from 'angular_node_express.nuspec'.
The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 
characters.

    at ChildProcess.<anonymous> (C:\angular-frontend-with-electron\node_modules\electron-winstaller\src\spawn-promise.ts:52:16)
    at ChildProcess.emit (events.js:315:20)
    at ChildProcess.EventEmitter.emit (domain.js:467:12)
    at maybeClose (internal/child_process.js:1048:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)

这是我迄今为止基于此 github 问题所尝试的内容 https://github.com/electron/windows-installer/issues/219

我尝试将我的项目移近 c 中的根目录,使其更短,如下所示:

C:\angular-frontend-with-electron>

但这没有帮助,我仍然得到错误

我还尝试将我的制造商配置名称更改为package.json更短的名称,但这也无济于事

"config": {
    "forge": {
      "packagerConfig": {},
      "makers": [
        {
          "name": "@electron-forge/maker-squirrel",
          "config": {
            "name": "angular_node_express"
          }
        }
    } ..."

有人可以指出我正确的方向吗?我在这里想念什么?

4

0 回答 0