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?
I referred Why does the 260 character path length limit exist in Windows?
enabling long paths in windows fixed my problem: https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later