Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yeomon CRUD Module Sub-Generator breaks project #347

Closed
coryfklein opened this issue Jan 6, 2015 · 24 comments

Comments

Projects
None yet
6 participants
@coryfklein
Copy link

commented Jan 6, 2015

  1. yo meanjs
  2. grunt
  3. localhost:3000 works perfectly as expected
  4. yo meanjs:crud-module myModule
  5. Nothing loads on localhost:3000
@nanuuki

This comment has been minimized.

Copy link

commented Jan 7, 2015

In which version are you experiencing this issue?

@coryfklein

This comment has been minimized.

Copy link
Author

commented Jan 7, 2015

I assume "latest stable", because that's what the docs say.

the Official Yo Generator, which generates the latest stable copy of the MEAN.JS boilerplate

@coryfklein

This comment has been minimized.

Copy link
Author

commented Jan 7, 2015

Also

$ yo --version
1.3.3
@coryfklein

This comment has been minimized.

Copy link
Author

commented Jan 7, 2015

This is probably obvious, but I should also mention that the yo meanjs:crud-module <module-name> step is near the beginning of the "Getting Started" guide.

@NeverOddOrEven

This comment has been minimized.

Copy link
Contributor

commented Jan 7, 2015

I will check this for 0.3.x. I'm working on the generator right now for 0.4.x.

@nanuuki

This comment has been minimized.

Copy link

commented Jan 7, 2015

You can verify the version of the generator with npm list generator-meanjs or npm list -g generator-meanjs. Latest seems to be 0.1.12. Just to make sure you have the latest version.

Edit: updated the command, oops!

@coryfklein

This comment has been minimized.

Copy link
Author

commented Jan 7, 2015

Yup, mine is 0.1.12.

@nanuuki

This comment has been minimized.

Copy link

commented Jan 7, 2015

Works for me w/ 0.1.12. Are there any errors when running Grunt after yo meanjs:crud-module myModule - either in the console or your browser? The page will be blank if bower install failed to install Angular for some reason.

@NeverOddOrEven

This comment has been minimized.

Copy link
Contributor

commented Jan 7, 2015

the crud-module generator works for me. can you check your javascript browser console for any errors?

@coryfklein

This comment has been minimized.

Copy link
Author

commented Jan 7, 2015

Here is the error in the javascript browser console:

Uncaught Error: Menu does not exists menus.client.service.js:40validateMenuExistance menus.client.service.js:40addMenuItem menus.client.service.js:84(anonymous function) mymodules.client.config.js:7invoke angular.js:3965(anonymous function) angular.js:3811forEach angular.js:325createInjector angular.js:3811doBootstrap angular.js:1444bootstrap angular.js:1459(anonymous function) application.js:19trigger angular.js:2573(anonymous function) angular.js:2853forEach angular.js:325eventHandler
@coryfklein

This comment has been minimized.

Copy link
Author

commented Jan 7, 2015

screen shot 2015-01-07 at 12 36 36 pm

@coryfklein

This comment has been minimized.

Copy link
Author

commented Jan 7, 2015

This is right after running this command:

➜  advancement git:(master) ✗ yo meanjs:crud-module myModule
? Which supplemental folders would you like to include in your angular module?
? Would you like to add the CRUD module links to a menu? Yes
? What is your menu identifier(Leave it empty and press ENTER for the default "topbar" menu)? myModule
   create app/controllers/mymodules.server.controller.js
   create app/models/mymodule.server.model.js
   create app/routes/mymodules.server.routes.js
   create app/tests/mymodule.server.model.test.js
   create app/tests/mymodule.server.routes.test.js
   create public/modules/mymodules/config/mymodules.client.routes.js
   create public/modules/mymodules/controllers/mymodules.client.controller.js
   create public/modules/mymodules/services/mymodules.client.service.js
   create public/modules/mymodules/tests/mymodules.client.controller.test.js
   create public/modules/mymodules/config/mymodules.client.config.js
   create public/modules/mymodules/views/create-mymodule.client.view.html
   create public/modules/mymodules/views/edit-mymodule.client.view.html
   create public/modules/mymodules/views/list-mymodules.client.view.html
   create public/modules/mymodules/views/view-mymodule.client.view.html
   create public/modules/mymodules/mymodules.client.module.js
@coryfklein

This comment has been minimized.

Copy link
Author

commented Jan 7, 2015

No errors from grunt:

  advancement git:(master) ✗ grunt
Running "jshint:all" (jshint) task
>> 66 files lint free.

Running "csslint:all" (csslint) task
>> 2 files lint free.

Running "concurrent:default" (concurrent) task
Running "nodemon:dev" (nodemon) task
Running "watch" task
Waiting...
[nodemon] v1.2.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: app/views/**/*.* gruntfile.js server.js config/**/*.js app/**/*.js
[nodemon] starting `node --debug server.js`
debugger listening on port 5858
NODE_ENV is not defined! Using default development environment
MEAN.JS application started on port 3000
GET / 304 36.206 ms - -
GET /lib/bootstrap/dist/css/bootstrap.css 304 9.363 ms - -
GET /modules/core/css/core.css 304 9.623 ms - -
GET /lib/bootstrap/dist/css/bootstrap-theme.css 304 10.627 ms - -
GET /modules/users/css/users.css 304 7.526 ms - -
GET /lib/angular/angular.js 304 12.851 ms - -
GET /lib/angular-resource/angular-resource.js 304 9.945 ms - -
GET /lib/angular-cookies/angular-cookies.js 304 7.490 ms - -
GET /lib/angular-animate/angular-animate.js 304 7.572 ms - -
GET /lib/angular-touch/angular-touch.js 304 8.054 ms - -
GET /lib/angular-sanitize/angular-sanitize.js 304 7.899 ms - -
GET /lib/angular-ui-utils/ui-utils.js 304 7.111 ms - -
GET /lib/angular-bootstrap/ui-bootstrap-tpls.js 304 8.611 ms - -
GET /lib/angular-ui-router/release/angular-ui-router.js 304 10.509 ms - -
GET /config.js 304 8.358 ms - -
GET /modules/articles/articles.client.module.js 304 8.661 ms - -
GET /application.js 304 9.282 ms - -
GET /modules/core/core.client.module.js 304 9.298 ms - -
GET /modules/mymodules/mymodules.client.module.js 304 8.827 ms - -
GET /modules/users/users.client.module.js 304 8.742 ms - -
GET /modules/articles/config/articles.client.config.js 304 5.953 ms - -
GET /modules/articles/controllers/articles.client.controller.js 304 5.853 ms - -
GET /modules/articles/config/articles.client.routes.js 304 7.159 ms - -
GET /modules/articles/services/articles.client.service.js 304 22.398 ms - -
GET /modules/core/controllers/header.client.controller.js 304 22.554 ms - -
GET /modules/core/config/core.client.routes.js 304 22.988 ms - -
GET /modules/core/controllers/home.client.controller.js 304 25.651 ms - -
GET /modules/core/services/menus.client.service.js 304 9.526 ms - -
GET /modules/mymodules/config/mymodules.client.config.js 304 9.228 ms - -
GET /modules/mymodules/config/mymodules.client.routes.js 304 9.910 ms - -
GET /modules/mymodules/services/mymodules.client.service.js 304 9.536 ms - -
GET /modules/mymodules/controllers/mymodules.client.controller.js 304 11.537 ms - -
GET /modules/users/config/users.client.config.js 304 9.261 ms - -
GET /modules/users/controllers/authentication.client.controller.js 304 8.769 ms - -
GET /modules/users/config/users.client.routes.js 304 9.208 ms - -
GET /modules/users/controllers/password.client.controller.js 304 6.432 ms - -
GET /modules/users/controllers/settings.client.controller.js 304 6.394 ms - -
GET /modules/users/services/authentication.client.service.js 304 6.378 ms - -
GET /modules/users/services/users.client.service.js 304 3.523 ms - -
GET /modules/core/img/brand/favicon.ico 304 3.284 ms - -
@coryfklein

This comment has been minimized.

Copy link
Author

commented Jan 7, 2015

screen shot 2015-01-07 at 12 40 13 pm

Looks like the conditional if(this.menus[menuId]) fails because this.menus legitimately doesn't have a 'myModule' property. However, it doesn't have an articles property for the built-in articles module either.

@coryfklein

This comment has been minimized.

Copy link
Author

commented Jan 7, 2015

In firefox I also get an error about livereload:

screen shot 2015-01-07 at 12 44 00 pm

@nanuuki

This comment has been minimized.

Copy link

commented Jan 7, 2015

Seems like you set an invalid menu (if you haven't modified anything); ? What is your menu identifier(Leave it empty and press ENTER for the default "topbar" menu)? myModule. Instead of myModule try with the default (topbar) and see if that helps.

@nanuuki

This comment has been minimized.

Copy link

commented Jan 7, 2015

Note that the menu ids are in no way related to you app names.

@NeverOddOrEven

This comment has been minimized.

Copy link
Contributor

commented Jan 7, 2015

@coryfklein, @nanuuki is correct. The app is boilerplated with only one pre-existing menu. Use "topbar"

@coryfklein

This comment has been minimized.

Copy link
Author

commented Jan 7, 2015

That resolved the problem.

I read What is your menu identifier as asking me what I wanted the item to be named in the top menu bar. My bad.

@coryfklein coryfklein closed this Jan 7, 2015

@NeverOddOrEven

This comment has been minimized.

Copy link
Contributor

commented Jan 7, 2015

No problem. Glad it's resolved.

@Microns

This comment has been minimized.

Copy link

commented May 9, 2015

I just made the exact same mistake. Maybe the wording in the generator prompt should be changed in the future?

@GPnow

This comment has been minimized.

Copy link

commented May 29, 2015

made the exact same mistake

@coryfklein

This comment has been minimized.

Copy link
Author

commented May 29, 2015

@GPnow Maybe submit a pull request?

@vbabaria

This comment has been minimized.

Copy link

commented Jul 18, 2015

using "yo meanjs" version 1.4.7, creating crud module still doesn't show up on topbar - would appreciate any suggestion? - thanks

i tried "topbar" as suggested by earlier comments, regenerated all files, restarted grunt but new module doesn't show up on the browser

bash-3.2# yo meanjs:crud-module superheroes
Which supplemental folders would you like to include in your angular module? css, img, directives, filters
What is your menu identifier(Leave it empty and press ENTER for the default "topbar" menu)? topbar

create app/controllers/superheroes.server.controller.js
create app/models/superhero.server.model.js
create app/routes/superheroes.server.routes.js
create app/tests/superhero.server.model.test.js
create app/tests/superhero.server.routes.test.js
create public/modules/superheroes/config/superheroes.client.routes.js
create public/modules/superheroes/controllers/superheroes.client.controller.js
create public/modules/superheroes/services/superheroes.client.service.js
create public/modules/superheroes/tests/superheroes.client.controller.test.js
create public/modules/superheroes/config/superheroes.client.config.js
create public/modules/superheroes/views/create-superhero.client.view.html
create public/modules/superheroes/views/edit-superhero.client.view.html
create public/modules/superheroes/views/list-superheroes.client.view.html
create public/modules/superheroes/views/view-superhero.client.view.html
create public/modules/superheroes/superheroes.client.module.js

pdfowler pushed a commit to pdfowler/mean that referenced this issue Jan 19, 2016

pdfowler pushed a commit to pdfowler/mean that referenced this issue Jan 19, 2016

Patrick Fowler
Merge branch 'mobile/develop' of bitbucket.org:outset_inc/outset into…
… mobile/develop

# By Rykov Serge
# Via Rykov Serge
* 'mobile/develop' of bitbucket.org:outset_inc/outset:
  profile display name changed
  add activity issues done meanjs#345, meanjs#346, meanjs#347, 363
  meanjs#347, added new field distance driven, saving it to props.
  fixed isue when we add custom truck and there is no logo for it, displaying text, if there is a logo - displaying only logo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.