I've created a new MeanJS project using Yeoman. It installs just fine. When I want to add a new module using yo meanjs:angular-module mymodule, it tries to create a new project ("Which mean.js version would you like to generate") instead of just adding the new module.
Where should I look for errors?
I'm using node v0.12.7 and npm v2.11.3.
Yeah, I know this could be confusing, at least when you starting with Meanjs. You probably used a version greater than 0.3.0 (stable) and sub-generators like yo meanjs:angular-module are only available (by that time of writing this) with version 0.3.0 (stable). Look at the red message top at this page: http://meanjs.org/generator.html What's confusing here is that they recommended on their page to install the application using the yeoman but after you did that you expect to be able to use sub-generators... If you want use subs, please use 0.3.0. and I suggest you to use supported Node.js and npm versions (http://meanjs.org/docs/0.3.x/#troubleshooting):
MongoDB
MongoDB version 2.4.x is supported.
Node.js
Node version 0.10.x is supported.
npm
npm version 1.3.x is supported.
Related
Why can't I install this aqueduct?
Although I have installed dart before as shown in the picture:
It's important to ensure that the dart SDK is in the PATH. You can easily test it by trying to use pub or dart.
One way to ensure it's in the PATH is by creating a .bashrc file in your user's folder.
Then add the following:
export PATH="$PATH:/path/to/dart/installation/bin/folder"
First of all check if dart is installed using dart --version if it gives a command not found error that means it is not installed (hence why you cannot install aqueduct since it requires pub which is shipped with the dart sdk).
To install dart on macOS first install brew and the follow the instruction here https://dart.dev/get-dart (don't run brew switch dart 2.1.0 as shown in the screenshot since it makes no sense because current the latest stable is 2.9.1 and 2.1.0 is pretty old).
If you don't want to install brew you can download the sdk here (for your system) extract it, and update your path variable as #gabriel-octávio says.
I want to use the stable release of the sdk, which should be 2.2.0, but when I in the console check the version with the command "dart --version", it says I am running "Dart VM version: 2.1.0".
I have tried to upgrade via choco, and it says that I already have 2.2.0 installed.
Do I have multiple versions av Dart installed and can switch between them?
If so, can I set a default version?
I'll just mark this as answered with the comment of jamsdlin, as it was the correct answer for me.
When you run dart, you'll run whichever dart binary is found first in your search PATH. You have multiple versions installed. Uninstall the old version or modify PATH so that the location for 2.2.0 occurs first.
I wasnt sure if i need to update it through their website or something, or if it is possible do call some sort of dart version command which will update DART to be a particular version.
Example: Dart is either 1.14, or 1.16. If i want to do it through pub, is there a way to do something like: pub set dart 1.15 or something. I know set isnt a valid command, but i think you get the jist.
This depends on your operating system and what system you use to install Dart.
For Debian you can use apt-get install dart. apt-get allows to pass a specific version number.
For installation options see https://www.dartlang.org/downloads/
In pubspec.yaml you can only specify what DART SDK version and dependency versions are supported by a package but it doesn't have and influence which Dart SDK version gets installed.
I have different projects using jHipster (which is an absolutely awesome project!!!).
My problem is that I have already made important changes on some projects created with earlier version and I don't want to upgrade to the latest version.
Is there any way to set the version while using the generator ?
What I'm looking for is something like that :
yo jhispter:entity foo -v 1.2.0
when I want to use the version 1.2.0 to generate the entity.
Does something like that exist ? If no, how to manage different versions of the generator ?
After more research on the subject it looks like you need to install an older version to switch version.
npm install -g generator-jhipster#1.2.0
I've created a Yeoman generator and want my team to use it.
What happens if I update my generator on Github? They installed the generator locally in an older version. Do they always have to install again to get the latest version?
Team members don't know when updates happen and I don't want them to care too much about it. I just would like for them to use the latest version of the generator.
What is the suggested way of updating generators?
Thanks
Glad you asked!
Starting with Yeoman RC1, which will be announced later today, there's a brand new way to manage your generators: Just enter yo and enjoy the new wizard:
If you select "Update Generators" from the menu, yo yo will take care of bringing them all to the latest version.
If you are a generator author and want to go one step further to make sure your users are always up-to-date, you can use update-notifier from the Yeoman project to greet users with a notification if they run an obsolete version.
If you want to update a specific generator you can run
npm update generator-mygenerator -g
Nice if you have many generators installed.
In linux I had trouble of upgrading using the yoeman cli because of some permission issues
So instead I did the following
In my case it was
sudo npm install -g generator-your-generator-name
This automatically reinstalled the latests version
You could try
npm install -g generator-your-generator-name