Yeoman not working inside Ubuntu 12.4 (Virtual box) #478

EbrahimPatel opened this Issue Sep 17, 2012 · 17 comments

5 participants


When I run this => patibs@patibs-VirtualBox:~$ yeoman
Then I get this => Cannot read property 'optOut' of undefined .

Scary stuff, I do not know what to do. This applies to just about every other yeoman command I know.

Installation went well, here is the conformation:

patibs@patibs-VirtualBox:~$ curl -L | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 5758 100 5758 0 0 4180 0 0:00:01 0:00:01 --:--:-- 4180

Wotcha! Well hi there.
Thanks for your interest in Yeoman.

Below is a quick audit I've run on your system to see if you have everything you need for Yeoman:

✓ curl is present, phew.
✓ git is installed, nice one.
✓ ruby is installed.
✓ RubyGems is installed.
✓ Compass is installed.
✓ PhantomJS is installed.
✓ jpegtran is installed.
✓ optipng is installed.
✓ yeoman global npm module ... installed!

Help me out and install anything that's missing above. Additional help at

Once you've ensured all of the above dependencies are present, we can start up Yeoman. Type yeoman at your prompt to get started.

But then when I typre this: yeoman
Then I get this => Cannot read property 'optOut' of undefined .

Scary stuff, I do not know what to do. This applies to just about every other yeoman command I know.



Also seeing Cannot read property 'optOut' of undefined on OSX 10.7.2

Yeoman member

@sindresorhus fairly sure this is the updater.

Yeoman member

@paulirish Yeah, looks like it :/

@alexraginskiy Can you post the full output when you run yeoman ? Do you have a folder in your homefolder called .config ? If yes, can you open the .config/npm-updater/yeoman.json file and post its contents?

@sindresorhus sindresorhus was assigned Sep 17, 2012
Yeoman member

@alexraginskiy For now, use the flag --skip-updater to temporary fix the problem. Eg: yeoman init --skip-updater

So glad I added that flag :)


@sindresorhus Thanks for looking into it.

The output without using the skip-updater flag was the cannot read property 'optOut' of undefined.

My home directory does not have a .config dir, but rather a .config file.


And that was the problem...deleted the .config file, and all is well.


@sindresorhus yes I do have a folder in my home dir called '.config' unfortunately inside this folder I have no directory called 'npm-updater' as you suggested...

Yeoman commands now all work ONLY when I add '--skip-updater'. So I am not sure what this fix is but it works for now. As for how long I ought to be using --skip-updater?

Well, before you ask why I am still here... Well this issue has led to another issue, now when I enter this =>

patibs@patibs-VirtualBox:~$ yeoman init --skip-updater

I get the following response...

"Running "init:yeoman" (init) task
This task will create one or more files in the current directory, based on the
environment and the answers to a few questions. Note that answering "?" to any
question will show question-specific help and answering "none" to most questions
will leave its value blank.

Existing files may be overwritten! Use --force to continue.

Aborted due to warnings."

Now I am not sure what --force is?


@alexraginskiy I am glad it's all worked out for you mate.


When I enter => patibs@patibs-VirtualBox:~$ yeoman install angular --skip-updater

I get this:
Unable to find Gruntfile. Do you need any --help?

My boss is going to kill me! I spent many hours trying to install Yeoman.


@EbrahimPatel confirm that the .config in your home directory is in fact a directory and not a file, and that it is writeable, since the error is caused by the fact that yeoman can't create a config file in that directory. Try backing up then deleting .config, too.


@alexraginskiy Thanks for your help... I have a directory called .config and not a file. The .config directory is writeable as all othe applications use it also.

I tried all your theory and did not prevail.

I am now going to try one more time a new install of yeoman from the begining on a new fresh copy of Ubuntu and if it is still giving me problems then I will have to go back to @cowboys grunt. Yeoman is great but I need a masters in computers to make it work.


New copy of Ubuntu, followed the install guide from here: #461 and now everything works. This is fantastic.

Thank you all.

Yeoman member

Reopening as the actual updater problem is not fixed. It's pretty clear it borks when .config is a file and not a directory.

Note to self: Add in a check to make sure it's a folder.

@sindresorhus sindresorhus reopened this Sep 19, 2012
Yeoman member

@sindresorhus I feel odd using ~/.config IMO it's too general. Can we use ~/.yeoman/update now that we don't blow away ~/.yeoman anymore?

Yeoman member

I bribed Paul to accept the ~/.config thingy. He ain't cheap, that's for sure.

We're also going to respect the XDG standard standard, with the $XDG_CONFIG_HOME var, mostly used on Linux.


Also getting this on OS X.

sumbr:test death$ yeoman
<FATAL> Cannot read property 'optOut' of undefined </FATAL>
sumbr:test death$ yeoman -v
<FATAL> Cannot read property 'optOut' of undefined </FATAL>

Edit: Only with yeoman --skip-updater yeoman works


Can you please re-install everything again this time making sure node is also installed properly
✓ curl is present
✓ git is installed
✓ ruby is installed.
✓ RubyGems
✓ Compass
✓ PhantomJS
✓ jpegtran
✓ optipng

Once you have node and all the rest installed properly then you should not get any more problems. You might also want to have a look at past issues where relating with node...

May I also suggest using something like Vbox as this will help when it comes to mistakes and starting with a fresh copy.


@EbrahimPatel Node is installed properly. Yeoman has been running flawlessly for a few weeks, it just suddenly stopped working. I just use yeoman --skip-updater for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment