question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error creating package 'TypeError: expected author to be a string'

See original GitHub issue

Hello, 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.

  1. npm run electron-build
  2. electron-packager . --platform=win32 --arch=all
  3. 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’?

collage

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
fcastilloeccommented, Apr 8, 2019

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 error

0reactions
hygkuicommented, Oct 11, 2019

Thanks! @fcastilloec it helps me understand what has happened

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python-django typeerror: expected string or ... - Stack Overflow
It indicates that your field for your datetime (when you created an Author object with timezone.now ) was invalid. This is because you...
Read more >
Node.js v19.3.0 Documentation
calls() and will throw an error for functions that have not been called the expected number of times. import assert from 'node:assert'; //...
Read more >
Python-django typeerror: expected string or ... - CodeProject
Okay someone helped me. >> author = Author(name="Victor Hugo",created = timezone.now). timezone.now should be. timezone.now().
Read more >
TypeError expected string or bytes-like object - STechies
This error is encountered as there a couple of values in the code that are floats. In order to run the code successfully,...
Read more >
IO tools (text, CSV, HDF5, …) — pandas 1.5.2 documentation
The Python engine loads the data first before deciding which columns to drop. squeezeboolean, default False ... C error: Expected 3 fields in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found