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

Bug(registry): serialize a BigInt in settings #807

Closed
4 tasks done
intech opened this issue Sep 3, 2020 · 1 comment
Closed
4 tasks done

Bug(registry): serialize a BigInt in settings #807

intech opened this issue Sep 3, 2020 · 1 comment

Comments

@intech
Copy link
Member

intech commented Sep 3, 2020

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I'm reporting the issue to the correct repository

Reproduce code snippet

const { ServiceBroker } = require("moleculer");
const broker = new ServiceBroker();

broker.createService({
    name: "test",
    settings: {
      test: 16384n
    }
});

broker.start().catch(console.error);

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Moleculer version: v0.14.10
  • NodeJS version: LTS
  • Operating System: Linux

Failure Logs

today at 01:51 [Runner] Do not know how to serialize a BigInt TypeError: Do not know how to serialize a BigInt
today at 01:51 at JSON.stringify (<anonymous>)
today at 01:51 at Object.safetyObject (/app/node_modules/moleculer/src/utils.js:350:26)
today at 01:51 at Registry.regenerateLocalRawInfo (/app/node_modules/moleculer/src/registry/registry.js:384:24)
today at 01:51 at /app/node_modules/moleculer/src/service-broker.js:457:19
today at 01:51 at processTicksAndRejections (internal/process/task_queues.js:93:5)
@intech
Copy link
Member Author

intech commented Sep 3, 2020

Ref solution: GoogleChromeLabs/jsbi#30 (comment)

@intech intech mentioned this issue Sep 3, 2020
10 tasks
@icebob icebob closed this as completed May 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants