moleculerjs / moleculer-cli

:herb: Command line tool for Moleculer
http://moleculer.services/docs/moleculer-cli.html
MIT License
48 stars 28 forks source link

Error: Missing helper: "if_eq" on moleculer init project #27

Closed fugufish closed 4 years ago

fugufish commented 5 years ago
Error: Missing helper: "if_eq"
{ Error: Missing helper: "if_eq"
    at Object.<anonymous> (/Users/fugufish/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js:19:13)
    at Object.eval [as main] (eval at createFunctionContext (/Users/fugufish/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:254:23), <anonymous>:29:78)
    at main (/Users/fugufish/node_modules/handlebars/dist/cjs/handlebars/runtime.js:175:32)
    at ret (/Users/fugufish/node_modules/handlebars/dist/cjs/handlebars/runtime.js:178:12)
    at ret (/Users/fugufish/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:526:21)
    at /Users/fugufish/node_modules/consolidate/lib/consolidate.js:876:16
    at /Users/fugufish/node_modules/consolidate/lib/consolidate.js:161:5
    at Promise._execute (/Users/fugufish/node_modules/bluebird/js/release/debuggability.js:313:9)
    at Promise._resolveFromExecutor (/Users/fugufish/node_modules/bluebird/js/release/promise.js:483:18)
    at new Promise (/Users/fugufish/node_modules/bluebird/js/release/promise.js:79:10)
    at promisify (/Users/fugufish/node_modules/consolidate/lib/consolidate.js:154:10)
    at exports.handlebars.render (/Users/fugufish/node_modules/consolidate/lib/consolidate.js:866:10)
    at /Users/fugufish/node_modules/moleculer-cli/src/init/index.js:319:6
    at /Users/fugufish/node_modules/moleculer-cli/node_modules/async/dist/async.js:3880:24
    at replenish (/Users/fugufish/node_modules/moleculer-cli/node_modules/async/dist/async.js:1011:17)
    at /Users/fugufish/node_modules/moleculer-cli/node_modules/async/dist/async.js:1016:9
    at eachOfLimit (/Users/fugufish/node_modules/moleculer-cli/node_modules/async/dist/async.js:1041:24)
    at /Users/fugufish/node_modules/moleculer-cli/node_modules/async/dist/async.js:1046:16
    at _parallel (/Users/fugufish/node_modules/moleculer-cli/node_modules/async/dist/async.js:3879:5)
    at Object.series (/Users/fugufish/node_modules/moleculer-cli/node_modules/async/dist/async.js:4735:5)
    at async.each (/Users/fugufish/node_modules/moleculer-cli/src/init/index.js:310:10)
    at /Users/fugufish/node_modules/moleculer-cli/node_modules/async/dist/async.js:3110:16
  description: undefined,
  fileName: undefined,
  lineNumber: undefined,
  message: 'Missing helper: "if_eq"',
  name: 'Error',
  number: undefined }
AndreMaz commented 5 years ago

Hi Can you provide steps to reproduce?

SirPhemmiey commented 5 years ago

I had the same issue. For some reason, this solution worked.

I guess you must have installed the framework with Yarn. So remove it first yarn global remove moleculer-cli, then try and install it with NPM (npm install -g moleculer-cli). And if you face permission issues (like I did), don't forget to add sudo npm install -g moleculer-cli.

Cheers!

fugufish commented 5 years ago

seems to have done the trick

SirPhemmiey commented 5 years ago

Give a thumbs up then :)

fugufish commented 5 years ago

I was born without thumbs :(

SirPhemmiey commented 5 years ago

hahaha..Jokes on you

fugufish commented 5 years ago

:)