meanjs / generator-meanjs

MEAN.JS Official Yeoman Generator
http://meanjs.org/
472 stars 178 forks source link

0.4.0 $ yo meanjs:crud-module <module-name> RUNS $ yo meanjs #79

Closed metasean closed 9 years ago

metasean commented 9 years ago

I've got a new 0.4.0 MEAN.js app.

When I try to generate a new crud-module named "meets" by running:

yo meanjs:crud-module meets

I am greeted by:

CompName:AppName metasean$ yo meanjs:crud-module meets

     _-----_
    |       |
    |--(o)--|   .--------------------------.
   `---------´  |    Welcome to Yeoman,    |
    ( _´U`_ )   |   ladies and gentlemen!  |
    /___A___\   '__________________________'
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

You're using the official MEAN.JS 0.4 generator.
? What would you like to call your application? (MEAN) 

Moved from https://github.com/meanjs/mean/issues/437

metasean commented 9 years ago

For anybody else wanting to run the equivalent of yo meanjs:crud-module <module_name> in the 0.4.0 generator, then new command is:

yo meanjs:vertical-module meets

@amoshaviv, @keshavos, and other official team members, are there plans to merge the functionality back in (i.e. to make yo meanjs:crud-module <module_name> work) or should user documentation be updated to reference the vertical-module command instead of the crud-module command?

TsarS commented 9 years ago

Same issue with yo meanjs:vertical-module meets

"What would you like to call your application?"

Shrizzy commented 9 years ago

@TsarS I had a similar issue when I first installed the 0.4.0 generator, turned out that I had the generator-meanjs installed twice on my machine in different locations, and it was mapping to the old version (both generators are installed using the same folder name). I've been using the vertical module generator for a few months now with no issues. Perhaps check if you have a similar issue, or perhaps an issue with your PATHs?

adskdave commented 9 years ago

I'm having this exact issue at the moment. @Shrizzy how can I see which yo meanjs: is running?

I'm happy to delete / re-install some packages if needed.

Thanks.

MikeWatsonDev commented 9 years ago

how can i check if have generator-meanjs installed twice ? npm -g ls --depth=0 /usr/local/lib ├── bower@1.5.2 ├── generator-meanjs@0.4.1 ├── grunt-cli@0.1.13 ├── npm@2.11.2 └── yo@1.4.8

I have the same problem, but here I only see one version of generator, I tried both yo meanjs:vertical-module listings && yo meanjs:crud-module listings, still launching the app generator

yusijs commented 9 years ago

Same issue for me - is it an issue with 0.4.1 maybe?

ilanbiala commented 9 years ago

We have no subgenerators for 0.4.1 as of now. We will have them out soon.

firasm101 commented 9 years ago

Hello,

I'm having the same issue, tried all that is suggested above - still doesn't work. What I did as a temporary workaround is to downgrade the "generator-meanjs" npm package to lower than "0.4.1". The one before "0.4.1" that was available for installation is "0.1.12", the issue is that it is dependent on a code structure that is not the latest one of meanjs so it inserts the files and the dependencies not in the right places, so you'll need to modify that.

If you still want to go on with this solution despite the above:

Remove the current version:

npm remove -g generator-meanjs

View available versions for installation:

npm view generator-meanjs versions

Install the most recent version after "0.4.1":

npm install -g generator-meanjs@(VERSION NUMBER)

Hope this helps.

Thank You, Firas

ilanbiala commented 9 years ago

@firasm101 we are no longer supporting that code and that version of the generator, so I do not recommend it.

hanssl commented 9 years ago

Do you have a timeline for when the generators will be available for 0.4.1?

ilanbiala commented 9 years ago

@hanssl no, there is a PR open #131, but anything you contribute will help speed up the process.

ghost commented 9 years ago

Is there any alternative for generating modules before the generator officially launches?

GraemeMorton commented 9 years ago

Still an issue? I get a slightly different error.

yo meanjs:crud-module addconfig
undefined
You're using the official MEAN.JS generator.
? What mean.js version would you like to generate? 0.4.1
0.4.1
? In which folder would you like the project to be generated? This can be changed later. (mean)

I never seem to see the Yeoman ascii art either.

sugeun commented 9 years ago

@Dwiea I'm having the same issue. It worked correctly by downgrading generator-meanjs version as @firasm101 suggested. I don't particularly like this workaround cause I wanted to use the chat example as a start of my project.

GeorgeWilliamson commented 9 years ago

Hi I'm one of the many I would say stuck at day 9 on the 30 day challenge. (re crud generator) I see from above the 0.4.0 works for a vertical-module. How can I download this generator ? Have tried sudo npm install --global meanjs/generator-meanjs0.4.0 , does not work. Is there any chance of having a stable version of meanjs, I'm using Ubuntu 14 and it's really a hit or miss exercise building meanjs with 0.4.1 version, Centos 7 seems to build a lot better, but prefer to stay with Ubuntu.

Cheers,

George

GPnow commented 9 years ago

@GeorgeWilliamson any progress mate ??? Facing the same situation

bhavik3184 commented 9 years ago

yo meanjs:vertical-module doesn't work on my windows 8.1 machine.

samhendrickx commented 9 years ago

Same issue here

GPnow commented 9 years ago

they already said they are working on the crud sub-generator for 0.4x,so do it manually for now i guess :+1:

front-thinking commented 9 years ago

Same issue here +1

dbelieves commented 8 years ago

4 days ago it has been updated...

but still i am facing the issue...

nithinrgaddam commented 8 years ago

how do u do it manually?

GPnow commented 8 years ago

Simple,copy paste the Article crud module,and rename everything inside. :+1:

dbelieves commented 8 years ago

@GPnow , that takes way too much time :|

calarconpieriz commented 8 years ago

So the conclusion is that there is no CRUD generator anymore?

ilanbiala commented 8 years ago

@calarconpieriz we are still finalizing that PR, so hopefully very soon.

shubhank-srivastava commented 8 years ago

@GPnow and @dbelieves Try this https://github.com/shubhank-srivastava/meanjs-module-generator A small script that I wrote that won't take much time by just doing node modgen articles products to create a products module similar to articles module.

GeorgeWilliamson commented 8 years ago

Thank you,

Shubhank Srivastava

On Thu, Dec 31, 2015 at 9:50 AM, Shubhank Srivastava < notifications@github.com> wrote:

@GPnow https://github.com/GPnow and @dbelieves https://github.com/dbelieves Try this https://github.com/shubhank-srivastava/meanjs-module-generator A small script that I wrote that won't take much time by just doing node modgen articles products to create a products module similar to articles module.

— Reply to this email directly or view it on GitHub https://github.com/meanjs/generator-meanjs/issues/79#issuecomment-168096817 .

Best Regards.

George Williamson.

Mobile +61439749014

mrjohnskelton commented 8 years ago

See https://github.com/node-inspector/v8-debug/issues/7 for a suggested fix by @stephen-cernota and @surprisetalk - worked for me on a shiny new version set

reuf commented 8 years ago

@shubhank-srivastava - thanks for the script - saves the day.

Aabir1 commented 8 years ago

i am not able to use this => sudo yo meanjs:crud-module costomers. i am using 0.4.3 please help me . i am stuck from yesturday

ilanbiala commented 8 years ago

@Aabir1 what do you see when you run that? Have you installed 0.4.3?

mdata2 commented 8 years ago

@ilanbiala.. Are there any updates on the fix for ver 0.4.3?

fennrussel commented 8 years ago

Same problem C:\test> yo meanjs:crud-module meets Error meanjs:crud-module meets

You don't seem to have a generator with the name meanjs:crud-module installed. You can see available generators with npm search yeoman-generator and then install them with npm install [name]. To see the 16 registered generators run yo with the --help option.

Please help me

ilanbiala commented 8 years ago

The command is mean-module. Sorry for the confusion guys.

Siddharth-ss42279 commented 8 years ago

facing same problem as of @fennrussel , any solution ???

mahmoudalcharif commented 8 years ago

@ilanbiala Themean-module command has created empty directories and not CRUD ready structure

mahmoudalcharif commented 8 years ago

Thank you @shubhank-srivastava. Your script did the job :+1:

Siddharth-ss42279 commented 8 years ago

@GPnow can u explain how to make crud module manualy??

Matt-Webb commented 8 years ago

Why is this issue marked as closed? I can't find a solution anywhere in here.

I am running MEAN version 0.4.2 with generator-meanjs version 0.4.3 neither of the following commands work:

yo meanjs:vertical-module {NAME}

or

yo meanjs:crud-module {NAME}

I get the following message:

You don't seem to have a generator with the name meanjs:vertical-module installed.
You can see available generators with npm search yeoman-generator and then install them with npm install [name].

The registered generators I have are:

Available Generators:

  meanjs
    angular-config
    angular-controller
    angular-directive
    angular-filter
    angular-route
    angular-service
    angular-tests
    angular-view
    express-controller
    express-model
    express-route
    express-tests
    mean-module

Does't anyone know how to resolve this?

ilanbiala commented 8 years ago

Use mean-module.

Matt-Webb commented 8 years ago

@ilanbiala I tried this, I only get a set of empty directories?!

Siddharth-ss42279 commented 8 years ago

yes, mean-module creates only empty directories.Rather you can use Article crud module @Matt-Webb

Matt-Webb commented 8 years ago

Can you initiate the Article Crude module after the initial project create? @Siddharth-ss42279

I guess I could create an empty project with the Article Crude and copy it across?!

Siddharth-ss42279 commented 8 years ago

yes, you can create project with Article module, than copy that article module to your main project .it works fine...! @Matt-Webb

Matt-Webb commented 8 years ago

Okay I just tried to do this, renaming the files and references from "articles" to my new module name, this is a massively time consuming task, even with a project Find + Replace, the individual files need renaming too!

Surely there is a fix for this generator???

amercode commented 8 years ago

I came up with a hack to fix this issue: please check out my video: https://www.youtube.com/watch?v=Nkpdp1ofux8

ilanbiala commented 8 years ago

Just published 0.4.4, see if that fixes your issues.

junit38 commented 8 years ago

@Matt-Webb This sh script may help you:

var=$1
if [ -n "$var" ]; then
    CRUDNAME=$1
    CRUDNAMEUPPERCASE=`echo ${CRUDNAME:0:1} | tr  '[a-z]' '[A-Z]'`${CRUDNAME:1}
    FOLDERNAME=$CRUDNAME's'
    # Create new folder
    cp -R modules/articles modules/$FOLDERNAME
    # Do the find/replace in all the files
    find modules/$FOLDERNAME -type f -print0 | xargs -0 sed -i -e 's/Article/'$CRUDNAMEUPPERCASE'/g'
    find modules/$FOLDERNAME -type f -print0 | xargs -0 sed -i -e 's/article/'$CRUDNAME'/g'
    # Delete useless files due to sed
    rm modules/$FOLDERNAME/**/*-e
    rm modules/$FOLDERNAME/**/**/*-e
    # Rename all the files
    for file in modules/$FOLDERNAME/**/*article* ; do mv $file ${file//article/$CRUDNAME} ; done
    for file in modules/$FOLDERNAME/**/**/*article* ; do mv $file ${file//article/$CRUDNAME} ; done
else
    echo "Usage: sh file.sh [crud-name]"
fi

It works for 0.5.0-beta version

atomixnmc commented 8 years ago

I hope this has a solution now?

I have 0.4.4 and it still not working, asking for the root project which is pretty nonsense:

yo meanjs:mean-module game _undefined _
You're using the official MEAN.JS generator.
? What mean.js version would you like to generate? (Use arrow keys)
master

0.4.0
0.4.1 ? In which folder would you like the project to be generated? This can be changed later. (mean)

Is this issue really fixed?