由于字符过多,电子锻造“make”失败

skd*_*dle 5 electron squirrel.windows electron-forge electron-packager angular

我将 Electron 添加到我的 Angular 应用程序中,以便能够将其作为桌面应用程序运行,但是\n我在 Electron Forge 的“make”步骤中遇到了问题,因为我不断收到以下错误消息

\n

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

\n

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

\n

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

\n
\n

电子锻造制造

\n
\n
\xe2\x9c\x94 Checking your system\n\xe2\x9c\x94 Resolving Forge Config\nWe need to package your application before we can make it\n\xe2\x9c\x94 Preparing to Package Application for arch: x64\n\xe2\x9c\x94 Preparing native dependencies\n\xe2\x9c\x94 Packaging Application\nMaking for the following targets: squirrel\n\xe2\x9c\x96 Making for target: squirrel - On platform: win32 - For arch: x64\n\nAn unhandled error has occurred inside Forge:\nAn error occured while making for target: squirrel\nFailed with exit code: 1\nOutput:\nAttempting to build package from \'angular_node_express.nuspec\'.\nThe 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 \ncharacters.\n\nError: Failed with exit code: 1\nOutput:\nAttempting to build package from \'angular_node_express.nuspec\'.\nThe 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 \ncharacters.\n\n    at ChildProcess.<anonymous> (C:\\angular-frontend-with-electron\\node_modules\\electron-winstaller\\src\\spawn-promise.ts:52:16)\n    at ChildProcess.emit (events.js:315:20)\n    at ChildProcess.EventEmitter.emit (domain.js:467:12)\n    at maybeClose (internal/child_process.js:1048:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)\n
Run Code Online (Sandbox Code Playgroud)\n

这是我到目前为止根据这个 github 问题所做的尝试 https://github.com/electron/windows-installer/issues/219

\n

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

\n
C:\\angular-frontend-with-electron>\n
Run Code Online (Sandbox Code Playgroud)\n

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

\n

我还尝试将我的制造商配置名称更改package.json为更短的名称,但这也没有帮助

\n
"config": {\n    "forge": {\n      "packagerConfig": {},\n      "makers": [\n        {\n          "name": "@electron-forge/maker-squirrel",\n          "config": {\n            "name": "angular_node_express"\n          }\n        }\n    } ..."\n
Run Code Online (Sandbox Code Playgroud)\n

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

\n