electron-userland / electron-installer-windows

Create a Windows package for your Electron app.
MIT License
470 stars 48 forks source link

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. #243

Closed ksummersill2 closed 5 years ago

ksummersill2 commented 5 years ago

Version 1.0.1

NPM: 5.6.0

Windows 10

Creating package (this may take a while) Error: Error creating package with NuGet: Error executing command (Exited with status 1): C:\Users\ksummersill\AppData\Roaming\npm\node_modules\electron-installer-windows\vendor\nuget\NuGet.exe pack C:\temp\electron-19824zVLFPwzdcPc7\eodims_0.0.1\nuget\eodims.nuspec -BasePath C:\temp\electron-19824zVLFPwzdcPc7\eodims_0.0.1\eodims -OutputDirectory C:\temp\electron-19824zVLFPwzdcPc7\eodims_0.0.1\nuget -NoDefaultExcludes 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 err (C:\Users\ksummersill\AppData\Roaming\npm\node_modules\electron-installer-windows\src\installer.js:31:11)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7) 'Error: Error creating package with NuGet: Error executing command (Exited with status 1):\nC:\\Users\\ksummersill\\AppData\\Roaming\\npm\\node_modules\\electron-installer-windows\\vendor\\nuget\\NuGet.exe pack C:\\temp\\electron-19824zVLFPwzdcPc7\\eodims_0.0.1\\nuget\\eodims.nuspec -BasePath C:\\temp\\electron-19824zVLFPwzdcPc7\\eodims_0.0.1\\eodims -OutputDirectory C:\\temp\\electron-19824zVLFPwzdcPc7\\eodims_0.0.1\\nuget -NoDefaultExcludes\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 characters.\r\n\n    at err (C:\\Users\\ksummersill\\AppData\\Roaming\\npm\\node_modules\\electron-installer-windows\\src\\installer.js:31:11)\n    at <anonymous>\n    at process._tickCallback (internal/process/next_tick.js:188:7)'

Command Ran: electron-installer-windows --src dist/app/ --dest dist/installers/

Trying to build a windows msi installer from an Angular 6 application.

fcastilloec commented 5 years ago

I'm sorry but I can't reproduce this at all. I tried installing electron-installer-windows as a global package, which looks like what you did, and no errors. I used both bash and powershell and neither showed errors, it looks like you used bash.

You're also not using the latest version of this package, which is v1.1.0, maybe tried upgrading.

If after upgrading you still see this error. Please copy/paste the output of running DEBUG=electron-installer-windows electron-installer-windows --src dist/app/ --dest dist/installers/ (running from bash)

kevinkhill commented 5 years ago

I have received this error as well building a Vue based app

Windows 10 in powershell electron-installer-windows 1.1.1 yarn 1.15.2 node 11.9.0 electron 4.1.0

> electron-installer-windows --src .\build\nc-vault-win32-x64\ --dest ./dist/installers/
Creating package (this may take a while)
Error: Error releasifying package: Error executing command (Exited with status 4294967295):
C:\Users\kevinh\AppData\Local\Yarn\Data\global\node_modules\electron-installer-windows\vendor\squirrel\Squirrel.com --releasify C:/Users/kevinh/AppData/Local/Temp/electron-27700EWG9dYy3pwbG/nc-vault_1.0.0_undefined/nuget/nc-vault.1.0.0.nupkg --releaseDir C:\Users\kevinh\AppData\Local\Temp\electron-27700EWG9dYy3pwbG\nc-vault_1.0.0_undefined\squirrel --setupIcon C:\Users\kevinh\AppData\Local\Yarn\Data\global\node_modules\electron-installer-windows\resources\icon.ico --loadingGif C:\Users\kevinh\AppData\Local\Yarn\Data\global\node_modules\electron-installer-windows\resources\animation.gif
System.AggregateException: One or more errors occurred. ---> System.IO.PathTooLongException: 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 System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.InternalGetDirectoryName(String path)
   at Squirrel.ReleasePackage.<>c__DisplayClass14_0.<extractZipWithEscaping>b__0()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Squirrel.ReleasePackage.CreateReleasePackage(String outputFile, String packagesRootDir, Func`2 releaseNotesProcessor, Action`1 contentsPostProcessHook)
   at Squirrel.Update.Program.Releasify(String package, String targetDir, String packagesDir, String bootstrapperExe, String backgroundGif, String signingOpts, String baseUrl, String setupIcon, Boolean generateMsi, String frameworkVersion, Boolean generateDeltas)
   at Squirrel.Update.Program.executeCommandLine(String[] args)
   at Squirrel.Update.Program.main(String[] args)
   at Squirrel.Update.Program.Main(String[] args)
---> (Inner Exception #0) System.IO.PathTooLongException: 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 System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.InternalGetDirectoryName(String path)
   at Squirrel.ReleasePackage.<>c__DisplayClass14_0.<extractZipWithEscaping>b__0()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

    at spawn.then.catch.err (C:\Users\kevinh\AppData\Local\Yarn\Data\global\node_modules\electron-installer-common\src\spawn.js:21:13)
    at processTicksAndRejections (internal/process/next_tick.js:81:5) 'Error: Error releasifying package: Error executing command (Exited with status 4294967295):\nC:\\Users\\kevinh\\AppData\\Local\\Yarn\\Data\\global\\node_modules\\electron-installer-windows\\vendor\\squirrel\\Squirrel.com --releasify C:/Users/kevinh/AppData/Local/Temp/electron-27700EWG9dYy3pwbG/nc-vault_1.0.0_undefined/nuget/nc-vault.1.0.0.nupkg --releaseDir C:\\Users\\kevinh\\AppData\\Local\\Temp\\electron-27700EWG9dYy3pwbG\\nc-vault_1.0.0_undefined\\squirrel --setupIcon C:\\Users\\kevinh\\AppData\\Local\\Yarn\\Data\\global\\node_modules\\electron-installer-windows\\resources\\icon.ico --loadingGif C:\\Users\\kevinh\\AppData\\Local\\Yarn\\Data\\global\\node_modules\\electron-installer-windows\\resources\\animation.gif\nSystem.AggregateException: One or more errors occurred. ---> System.IO.PathTooLongException: 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.\r\n   at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)\r\n   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)\r\n   at System.IO.Path.InternalGetDirectoryName(String path)\r\n   at Squirrel.ReleasePackage.<>c__DisplayClass14_0.<extractZipWithEscaping>b__0()\r\n   at System.Threading.Tasks.Task.InnerInvoke()\r\n   at System.Threading.Tasks.Task.Execute()\r\n   --- End of inner exception stack trace ---\r\n   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\r\n   at Squirrel.ReleasePackage.CreateReleasePackage(String outputFile, String packagesRootDir, Func`2 releaseNotesProcessor, Action`1 contentsPostProcessHook)\r\n   at Squirrel.Update.Program.Releasify(String package, String targetDir, String packagesDir, String bootstrapperExe, String backgroundGif, String signingOpts, String baseUrl, String setupIcon, Boolean generateMsi, String frameworkVersion, Boolean generateDeltas)\r\n   at Squirrel.Update.Program.executeCommandLine(String[] args)\r\n   at Squirrel.Update.Program.main(String[] args)\r\n   at Squirrel.Update.Program.Main(String[] args)\r\n---> (Inner Exception #0) System.IO.PathTooLongException: 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.\r\n   at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)\r\n   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)\r\n   at System.IO.Path.InternalGetDirectoryName(String path)\r\n   at Squirrel.ReleasePackage.<>c__DisplayClass14_0.<extractZipWithEscaping>b__0()\r\n   at System.Threading.Tasks.Task.InnerInvoke()\r\n   at System.Threading.Tasks.Task.Execute()<---\r\n\r\n\n    at spawn.then.catch.err (C:\\Users\\kevinh\\AppData\\Local\\Yarn\\Data\\global\\node_modules\\electron-installer-common\\src\\spawn.js:21:13)\n    at processTicksAndRejections (internal/process/next_tick.js:81:5)'
ksummersill2 commented 5 years ago

@kevinkhill The issue i found out is that be default windows setups an outpath for you. This outpath is way to long for the limitations of nuget. So what i did what define the OutPath within my angular json build command. You should be able to do the same with Vue. Example:

  "electron": "ng build --base-href ./ --output-path=electron/dist/dist && tsc --p electron && electron .",
 "electron-windows": "ng build --base-href ./  --output-path=electron/dist/dist && electron-builder -w"
yogya157 commented 5 years ago

This is the error "Attempting to build package from 'swiftly-electron.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." what i am getting when trying to generate installer in electron,angular7 window app. please help i am stuck.Thanks in advance.