How to use the Meanjs generator with Yeoman? - yeoman

I am trying to use the Yeoman generator "Meanjs". When I enter yo --help I get this:
Meanjs
meanjs:angular-config:indexjs
meanjs:angular-controller:indexjs
meanjs:angular-directive:indexjs
meanjs:angular-filter:indexjs
meanjs:angular-module:indexjs
meanjs:angular-route:indexjs
meanjs:angular-service:indexjs
meanjs:angular-test:indexjs
meanjs:angular-view:indexjs
meanjs:app:indexjs
meanjs:crud-module:indexjs
meanjs:express-controller:indexjs
meanjs:express-model:indexjs
meanjs:express-route:indexjs
meanjs:express-test:indexjs
So apparently the Meanjs generator is installed. However when I try using yo meanjs or yo Meanjs I get the error
Error meanjs
You don't seem to have a generator with the name meanjs installed. You
can see available generators with npm search yeoman-generator and then
insta ll them with npm install [name]. To see the 15 registered
generators run yo with the --help option.

Did you "npm install -g generator-meanjs" (where -g is globally and not only for your project)? This should give you all the meanjs (sub)-generators available. Then a "yo meanjs" followed by "grunt" should scaffold the example-app for you. Works perfectly for me.
I am wondering what the ":indexjs" is with your generators. I don't have that...

I don´t know why but it never worked using only meanjs but as soon as I used meanjs:app:indexjs it worked fine.

Had similar problem and when I run $ yo doctor
I got this:
✖ NODE_PATH matches the npm root
npm global root value is not in your NODE_PATH
running this, solved it for me:
echo "export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modules" >> ~/.bashrc && source ~/.bashrc

Related

Lumber: Command 'lumber' not found

I just setup a Rails Application in my Ubuntu 18 machine, and I want to connect it to Forest Admin. However, Forest Admin requires that I set up a Node Application using npm first. The node application requires the installation of Lumber CLI tool in order to install Forest Admin.
I have however installed Lumber CLI tool by running the command below:
npm install -g lumber-cli#latest -s
When I run the command below npm lumber -version in my command line terminal, I get the response:
6.13.4
But when I try to generate the Forest Admin using the command below:
lumber generate "my_project"...
I get the following error:
Command 'lumber' not found
I need some help. Thank you.
Here's how I solved it:
The issue is because NPM does not have the write access to the directory that will contain the package you want to install (here lumber-cli).
To solve this issue, override the default directory where your global NPM packages will be stored:
mkdir ~/.npm-global
Then, configure NPM to use this directory instead of the default one:
npm config set prefix '~/.npm-global'
Then, make the node executables accessible from your PATH. To do so, export the environment variable PATH by opening or creating the file ~/.profile and add this line at the end:
export PATH=~/.npm-global/bin:$PATH
Finally, reload the ~/.profile file:
source ~/.profile
Try installing lumber cli again using the command below:
npm install -g lumber-cli#latest -s
It should be able to install lumber without any error, and also display the directory where lumber-cli is installed.
Reference: Prevent permission errors at installation
That's all
I hope this helps

Yeoman still lists uninstalled generators

I wanted to upgrade a generator, so I hit npm update -g generator-jhipster, I have node installed via nvm using v6.9.2.
Even after removing and reinstalling nvm, npm, yo, I still see the same generators!?
~/Documents/workspace/jhipster$ which yo
/Users/jordanbaucke/.nvm/versions/node/v6.9.2/bin/yo
~/Documents/workspace/jhipster$ which npm
/Users/jordanbaucke/.nvm/versions/node/v6.9.2/bin/npm
~/Documents/workspace/jhipster$ which node
/Users/jordanbaucke/.nvm/versions/node/v6.9.2/bin/node
~/Documents/workspace/jhipster$ yo --generators
All looks good!
~/Documents/workspace/jhipster$ yo --generators
Available Generators:
jhipster
cloudfoundry
entity
heroku
languages
openshift
service
aws
client
docker-compose
import-jdl
info
kubernetes
modules
server
upgrade
webapp
jasmine
mocha
But... none of these should be installed:
~/Documents/workspace/jhipster$ npm list -g --depth=0 | grep 'generator'
~/Documents/workspace/jhipster$
Where is yo finding these generators and how do I remove them???
Already tried:
npm uninstall -g yo
rm -rf ~/.nvm
Looks like you have multiple npm installed on your computer. This means that there's multiple global node modules folders.
You can run DEBUG=yeoman:* yo to get some insight into where those globally installed packages are.
As for the multi npm instances, you should delete the duplicated one.

How to build LLVM doxygen in HTML ? I tried but failed

I want to get a copy of the doxygen web-pages of llvm, so I can work with it without the internet.
I did as follows:
$ cd LLVM_ROOT_DIR
$ mkdir out
$ cd out/
$ ../configure --enable-doxygen
$ make ENABLE_OPTIMIZED=1
But it only built llvm without documentation. I also tried
$ make BUILD_FOR_WEBSITE=1 ENABLE_OPTIMIZED=1
and
$ make ENABLE_OPTIMIZED=1 EXTRA_DIST=1
All of them did not work.
How could I build the web pages ?
Thanks a lot.
Using recent versions of LLVM, an in-source build is prohibited by configure. Luckily the documentation can be built using cmake.
$ mkdir out
$ cd out/
$ cmake -DLLVM_ENABLE_DOXYGEN=On ../
$ make doxygen-llvm
The process will take a while, but after it you should have the full documentation.
Once you enable doxygen in the configure step, you can run make doxygen-llvm on the docs/ folder in your build directory.
You can run make help to check the available options.
I collect the web-site by wget.

jhipster application files generated in wrong directory

When I try to create a jhipster application in ubuntu 13.10 with yo jhipster the generated output files are always dumped in the wrong directory.
For example I run yo jhipster in the directory /mnt/mercury/jhipster-test/alpha then the files are dumped out to /mnt/mercury. In fact if I run yo jhipster in any subdirectory of /mnt/mercury they are always dumped out to /mnt/mercury.
I'm using yo version 1.1.2 from the standard ubuntu repository
Please advise how to generate files to be output in current directory.
For the benefit of anyone else facing this problem.
I managed to get Yeoman working with the following
npm cache clean
sudo npm rm -g yo
npm cache clean
sudo npm install -g yo
My problem: Accidentally "yo generating" in the parent directory.
Solution: Delete the .yo-rc.json file in the parent directory, then running the yo generator command in the child directory.
As discussed in the comments, this is a Yeoman problem on Ubuntu 13.10:
We don't have this issue with Ubuntu 12.04
There is the same issue with other generators ("yo webapp") on Ubuntu 13.10
As a workaround, I recommend you have a look at our Docker container:
https://github.com/jhipster/jhipster-docker
This will allow you to run the full JHipster stack, with Ubuntu 12.04, inside a container! Just use it to generate the app, then you can work directly on your host machine.
On Mac OSX Maverick with Node v0.10.26, yo v1.1.2 and generator-jhipster v0.11, the yo hipster command was generating all the sources always in the same (wrong!) directory and not using my current directory.
I fixed this problem doing the following:
cd <WRONG_DIR_WHERE_CODE_IS_CREATED>
rm .yo-rc.json node_modules/
npm uninstall -g karma
npm install -g karma (Note: using sudo it was not working!)
sudo npm install -g generator-jhipster
Not sure why but I've then been able to install karma and generator-jhipster again and suddenly yo hipster starting generating code again in my current directory
Could it be caused by different environment variables when launching npm with sudo?
The file .yo-rc.json is hidden, if it is not deleted, the generator will constantly take the settings from it. You must delete .yo-rc.json.

rubys> cd command not working in command line

I'm just getting into ruby and am trying to execute a walkthrough from Sam Ruby's Agile web development.
I've created a directory using mkdir work
Next i'm instructed to open a terminal and type rubys> cd work
The error I'm getting reads:
No command 'rubys' found, did you mean:
Command 'ruby' from package 'ruby' (main)
rubys: command not found
Can anyone inform me of what I'm doing wrong?
I've also tried changing from ~ to the work directory before entering my command.
In this book, rubys> is a command prompt, much like you have C:\> in the Windows terminal.
Ignore that first bit and everything should start working.
I guess you're doing it wrong.
mkdir work
creates a directory called "work". It has nothing to do with Ruby.
cd work
will then change into that directory. Forget about the rubys>.

Resources