Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating package with NuGet #228

Closed
palbcn opened this issue Apr 13, 2018 · 7 comments
Closed

Error creating package with NuGet #228

palbcn opened this issue Apr 13, 2018 · 7 comments
Assignees
Labels

Comments

@palbcn
Copy link

palbcn commented Apr 13, 2018

What version of electron-installer-windows are you using?
1.0.2

What version of node and npm are you using?
v8.9.4
v5.8.0

What operating system are you using?
Windows 7 Professional
Service Pack 1

Can you compile the example app successfully?
Yes

What did you do? Please include the configuration you are using for electron-installer-windows.

I can reproduce the error with the sample electron app

> git clone https://github.com/electron/electron-quick-start
> cd electron-quick-start
> npm install
> electron-packager . --out dist
> electron-installer-windows --src dist/electron-quick-start-win32-x64/ --dest dist/installer/

What did you expect to happen?
succesfully build the installer

What actually happened?

Error: Error creating package with NuGet: Error executing command (Exited with status 1):
C:\Users\Pppp\AppData\Roaming\npm\node_modules\electron-installer-windows\vendor\nuget\NuGet.exe pack c:\temp\electron-86521BJCLm8LWRXn\electron-quick-start_1.0.0\nuget\electron-quick-start.nuspec -BasePath c:\temp\electron-86521BJCLm8LWRXn\electron-quick-start_1.0.0\electron-quick-start -OutputDirectory c:\temp\electron-86521BJCLm8LWRXn\electron-quick-start_1.0.0\nuget -NoDefaultExcludes
URI no v�lido: no se puede determinar el formato del URI.

the complete debug log is
electron-installer-windows-error-log.txt

@fcastilloec
Copy link
Collaborator

fcastilloec commented Apr 13, 2018

Hi, thanks for reporting this. I'll try to fix this in a new release.
As a workaround, always make sure that your package.json author field is an object containing a url, or if it's a string, make sure it has a url wrapped around parenthesis.
You can read about how it should be done here: https://docs.npmjs.com/files/package.json#people-fields-author-contributors

@fcastilloec fcastilloec self-assigned this Apr 13, 2018
@palbcn
Copy link
Author

palbcn commented Apr 14, 2018

thanks for the quick answer.
I will fix my package.json per your recommendations.

@fcastilloec
Copy link
Collaborator

This has been fixed in the latest release. Try updating to v1.1.0 and let me know how it goes

@VishalChauha
Copy link

VishalChauha commented Nov 6, 2018

here is my package.json file

{
"name": "muon-quick",
"version": "1.0.0",
"description": "A minimal Muon application",
"main": "main.js",
"scripts": {
"start": "node setup.js"
},
"repository": "https://github.com/brave/muon-quick",
"keywords": [
"Muon",
"quick",
"start",
"tutorial",
"demo"
],
"author": "Brave Software",
"license": "CC0-1.0",
"devDependencies": {
"electron": "^1.7.6",
"electron-builder": "^19.27.7",
"electron-prebuilt": "brave/electron-prebuilt"
}
}

and
i got error why try to run create exe from package

Error: Error creating package with NuGet: Error executing command (Exited with status 1): C:\Users\Xdmin\AppData\Roaming\npm\node_modules\electron-installer-windows\vendor\nuget\NuGet.exe pack C:\Users\Xdmin\\AppData\Local\Temp\electron-4868eS3jYL4dmhFv\muon-quick_1.0.0\nuget\muon-quick.nuspec -BasePath C:\Users\Xdmin\AppData\Local\Temp\electron-4868eS3jYL4dmhFv\muon-quick_1.0.0\muon-quick -OutputDirectory C:\Users\Xdmin\AppData\Local\Temp\electron-4868eS3jYL4dmhFv\muon-quick_1.0.0\nuget -NoDefaultExcludes File not found: 'muon-quick.exe'.

how can i fix this?

@ksummersill2
Copy link

OutputDirectory

You could probably go to the node_modules -> electron-windows-installer -> install.js file and modify the path to the muon-quick.exe. Just look for OutputDirectory in the installer.js file.

@ksummersill2
Copy link

ksummersill2 commented Dec 28, 2018

I am currently getting the following error. Any help would be great. I have already moved everything to my c drive and tried to change the paths in the installer.js file.
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-24488XbZ8Hxz7chub\eodims_0.0.1\nuget\eodims.nuspec -BasePath C:\temp\electron-24488XbZ8Hxz7chub\eodims_0.0.1\eodims -OutputDirectory C:\temp\electron-24488XbZ8Hxz7chub\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-24488XbZ8Hxz7chub\\eodims_0.0.1\\nuget\\eodims.nuspec -BasePath C:\\temp\\electron-24488XbZ8Hxz7chub\\eodims_0.0.1\\eodims -OutputDirectory C:\\temp\\electron-24488XbZ8Hxz7chub\\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)'

@fcastilloec
Copy link
Collaborator

fcastilloec commented Dec 28, 2018

This bug has been closed for a while. The originally reported error has been fixed. If you believe that you found a bug in our code, please open a new issue. If you're asking for help on how to use the module, and why it's not working for you, Github issues is not the place for that.

@VishalChauha your problem is related to the name that electron-packager is creating. Use the executable-name option when running electron-packager so your exe has the appropiate name.
The suggestions from @ksummersill2 is dangerous and not the way things should be done. Your question has been addressed many times in a few issues that have been closed already.

@electron-userland electron-userland locked as resolved and limited conversation to collaborators Dec 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants