Closed jedau closed 8 years ago
I'm having the same problem on OSX, same output. Specifically, running yo meanjs:crud-module derp
kills a previously working generated install.
nodejs version: 5.11.0 generator-meanjs version: 0.4.4 yo version: 1.7.0
I also have the same problem on OSX
@codydaig @ilanbiala any ideas what could be causing this?
When you created your application using yo meanjs
did you select master? I may be wrong, but it seems the generator is geared towards the 0.4.x branches of MEAN.JS.
Master is 0.5.0-beta. This would explain the issue with the menus. In 0.5.0-beta, they have renamed the service to menuService
. Please read through #210, as this seems to be a duplicate.
As for the question asking if the generator should name customer
to customers
, I believe this is the expected behavior. The generator pluralizes module names.
@alexisio yeah, I'm on master
. I just read through the other issue and it does indeed look similar. I didn't notice that because of the title while looking through the open issues. I'm closing this for now, and I'll continue to monitor the issue from the other one.
@jedau
But the bug with these errors isn't fixed, right?
So something like this 39:121 error Unnecessary use of boolean literals in conditional expression no-unneeded-ternary
How can I prevent that?
The bug in the other thread is about another problem, isn't it?
@IL4Miy error Unnecessary use of boolean literals in conditional expression no-unneeded-ternary
is also covered in that other issue. That's why I closed this one, so that we can all focus on that thread that was created first.
With regard to resolving that error, the way I fixed that was retool the line to look like this:
customer.isCurrentUserOwner = req.user && customer.user && customer.user._id.toString() === req.user._id.toString();
Try it out on your code. I hope that helps resolve that issue.
@jedau This works for me but I also habe these 38 other errors. Someone hast to change the files and fork this.
@IL4Miy yeah, I guess that's why I created an Issue, so that they would notice and fix it. I fixed all of the errors one by one, so that resolved it for me. You could either do that or just wait for the fix.
I'm waiting for the fix as well, but I've since moved past this part. It would be nice to have a fix for this issue for when I create a new CRUD module for a different project.
It seems that it's introducing lots of whitespaces to the generated code.
I ran:
Even though I entered
customer
as the name of the module, the generated name iscustomers
. Is that the correct behavior?nodejs version:
5.11.0
generator-meanjs version:0.4.4
yo version:1.7.0
OS:Ubuntu 14.04.4
I fixed them all one-by-one just to get
grunt
to execute properly.EDIT: After all errors were fixed, all the pages were blank, even the index. Looking at the web inspector, it seems I encountered
Error: [$injector:unpr] Unknown provider: MenusProvider <- Menus
. I tried to changemenuConfig.$inject
in/modules/customers/client/config/customers.client.config.js
totopbar
, but it didn't do anything. I changed it back tomenuService
and it finally worked properly. I'm not quite sure what happened