error creating package 'TypeError: expected author to be a string'
See original GitHub issueHello, I have developed an app in angular 6. now I want to make desktop application of it. I have installed electron, electron packager & electron-installer-windows globally. I have tested my build in development it’s working fine. I have created a build using windows packager. now I am creating a Windows package but when I run my command it shows me some error like ‘TypeError: expected author to be a string’. I don’t even understand what is the problem. where Linux build is successfully created.
following are some steps I am performing.
- npm run electron-build
- electron-packager . --platform=win32 --arch=all
- electron-installer-windows --src task-reporting-tool-win32-x64 --dest …/task-reporting-tool
package.json
{ "name": "task-reporting-tool", "version": "0.0.0", "description": "TRTool", "main": "main.js", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", "electron": "electron .", "electron-build": "ng build --prod && electron ." }, "private": true, "author": { "name": "Lakhan", "email": "lakhank2951@gmail.com", "url": "http://mohartech.com" } }
in my package.json file, I have mentioned description, author, etc. so why it is throwing an error of ‘TypeError: expected author to be a string’?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top GitHub Comments
Please read the README to see how to use the options. The name of the option and the type are all wrong. It’s
options
(plural) and you need to pass an array.https://github.com/electron-userland/electron-installer-windows#optionsauthors
EDIT: I also forgot to mention that you have to repackage your app with the new author as a string, this module reads the
package.json
from the packaged app. If you’re not repackaging and just changing your project’s author, you’ll see the same errorThanks! @fcastilloec it helps me understand what has happened