mantrajs / mantra-cli

Command line interface for building Meteor apps with Mantra
MIT License
135 stars 33 forks source link

Error on Generate Collection? #61

Closed VikR0001 closed 8 years ago

VikR0001 commented 8 years ago

I ran these commands:

mantra g module job_specialties
mantra g publication job_specialties
mantra g method job_specialties
mantra g container job_specialties:job_specialties_list
mantra g container job_specialties:new_job_specialty
mantra g action job_specialties:job_specialties
mantra g collection job_specialties -s collection2

Everything went perfectly until the last command:

mantra g collection job_specialties -s collection2

That command generated the following error:

fs.js:549 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); ^

Error: ENOENT: no such file or directory, open './lib/collections/job_specialties.js'

How can I correct this?

Thanks in advance for the info!

sungwoncho commented 8 years ago

I created a new Mantra app with CLI v0.3.9, ran all the commands in series, but failed to reproduce the error. What version of CLI and Meteor are you using? More information needed.

VikR0001 commented 8 years ago

Interesting. The project is METEOR@1.3.1, and mantra-cli@0.3.9.

sungwoncho commented 8 years ago

I just deleted /lib from the app and ran mantra g collection job_specialties -s collection2 to successfully reproduce your error. The problem seems to be that there is no directory for the collection. Did you change the directory structure? Please make sure /lib/collections exists in your app.

VikR0001 commented 8 years ago

Makes sense. Thanks very much!

VikR0001 commented 8 years ago

That was definitely it. I have started a new project directory for my app, built from the ground up using Mantra-CLI.