moleculerjs / site

:globe_with_meridians: Official website for Moleculer
https://moleculer.services
22 stars 71 forks source link

Invalid validator.type FastestValidator #120

Closed taina0407 closed 4 years ago

taina0407 commented 4 years ago

Prerequisites

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

Current Behavior

moleculer.config.js accept validator.type="Fastest" instead of "FastestValidator" as documentation said

Expected Behavior

Correct documentation about "FastestValidator"

Failure Information

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Edit moleculer.config.js, set
    validator: {
    type: "FastestValidator",
    }
  2. run "npm run dev"

Context

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

Failure Logs

[2020-08-12T12:30:38.616Z] FATAL XXX.local-82113/BROKER: Unable to create ServiceBroker. BrokerOptionsError: Invalid Validator type 'FastestValidator'.
    at Object.resolve (/XXX/node_modules/moleculer/src/validators/index.js:49:10)
    at new ServiceBroker (/XXX/node_modules/moleculer/src/service-broker.js:233:33)
    at MoleculerRunner.startBroker (/XXX/node_modules/moleculer/src/runner.js:450:17)
    at /XXX/node_modules/moleculer/src/runner.js:475:21 {
  code: 500,
  type: 'BROKER_OPTIONS_ERROR',
  data: { type: 'FastestValidator' },
  retryable: false
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! XXX@1.0.0 dev: `moleculer-runner --repl --hot services/**/*.service.js --envfile .env`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the XXX@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /XXX/.npm/_logs/2020-08-12T12_30_38_628Z-debug.log