Hashnode / mern-cli

⛔️ DEPRECATED - A cli tool for getting started with MERN
http://mern.io/
MIT License
572 stars 149 forks source link

running merng produces an error #33

Closed sanketsingh24 closed 6 years ago

sanketsingh24 commented 6 years ago

When i run merng, it produces the following error-

user@mypc:~/Documents/node_modules/mern-cli/urapp$ node ../bin/merng.js

  Usage: merng [options] <generator> [args]

  Generate components, routes, controllers, models using mern generator

  Options:

    -h, --help  output usage information
Available Generators
____________________

/home/user/Documents/node_modules/mern-cli/lib/commands/generate.js:43
    blueprints.forEach(function (b) {
               ^

TypeError: Cannot read property 'forEach' of undefined
    at Command.<anonymous> (/home/user/Documents/node_modules/mern-cli/lib/commands/generate.js:43:16)
    at emitNone (events.js:106:13)
    at Command.emit (events.js:208:7)
    at Command.outputHelp (/home/user/Documents/node_modules/commander/index.js:1146:8)
    at Command.help (/home/user/Documents/node_modules/commander/index.js:1156:8)
    at Object.<anonymous> (/home/user/Documents/node_modules/mern-cli/lib/commands/generate.js:49:25)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)

I am running merng locally here, is that why this error is occuring?

mannyhenri commented 6 years ago

@sanketsingh24 let me test this and get back to you

mannyhenri commented 6 years ago

@sanketsingh24 I just realized this issue is posted on the CLI tool and not on the main mern-starter repo, would you mind reposting this on here: https://github.com/Hashnode/mern-starter

Will close this issue here.

HansUXdev commented 6 years ago

this issue isn't solved and should be reopened...

valeporti commented 6 years ago

this issue isn't solved and should be reopened...

Hi, you can solve this issue just by erasing ".blueprints" at the end of the line 37 in the generate.js file in the mern-cli library: ".....npm\node_modules\mern-cli\lib\commands\generate.js".

Accessing .blueprints of the blueprints is impossible for this object.