简体   繁体   中英

electron forge 'make' failing due to too many characters

I added electron to my angular app to be able to run it as a desktop application but I'm having trouble with the 'make' step from electron forge because I keep getting the following error message

here is a screenshot of the error message but I also pasted it down below

I'm confused because I don't actually know which path that is being referred to here, is too long. Is it my directory where the file is or is it the name of my project?

(I can't find a file named angular_node_express.nuspec in my entire project)

electron-forge make

✔ 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)

here is what I've tried so far based on this github issue https://github.com/electron/windows-installer/issues/219

I tried moving my project closer to root in c so its shorter like this:

C:\angular-frontend-with-electron>

but that didnt help, I still get the error

I also tried changing the maker config name in my package.json to something much shorter but that did not help either

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

can someone please point me in the right direction? what am I missing here?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM