yeoman / doctor

Detect potential issues with users system that could prevent Yeoman from working correctly
http://yeoman.io
BSD 2-Clause "Simplified" License
61 stars 17 forks source link

yo doctor is throwing an error after npm install latest version #16

Closed deostroll closed 9 years ago

deostroll commented 9 years ago

Here is the output of the same:

$ yo doctor

/usr/local/lib/node_modules/yo/lib/cli.js:43
    require('yeoman-doctor').run();
                             ^
TypeError: Object function () {
  var errCount = 0;

  console.log('\n' + chalk.underline.blue('Yeoman Doctor'));
  console.log('Running sanity checks on your system\n');

  eachAsync(objectValues(rules), function (rule, i, cb) {
    rule.verify(function (err) {
      console.log(err ? symbols.error : symbols.success + ' ' + rule.description);

      if (err) {
        errCount++;
        console.log(err);
      }

      cb();
    });
  }, function () {
    if (errCount === 0) {
      console.log(chalk.green('\nEverything looks all right!'));
    } else {
      console.log(chalk.red('\nFound potential issues on your machine :('));
    }
  });
} has no method 'run'
    at pre (/usr/local/lib/node_modules/yo/lib/cli.js:43:30)
    at Object.<anonymous> (/usr/local/lib/node_modules/yo/lib/cli.js:156:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:929:3
sindresorhus commented 9 years ago

Sorry about that. I didn't realize yo used the programmatic API when I refactored this module. Fixed in yo.

$ npm install -g yo

to fix it.

adotellison commented 9 years ago

I've tried running $npm install -g yo and are still getting the same error.

ghost commented 9 years ago

I have the same issue. I installed node 0.10.36. via nvm on Ubuntu Linux 14.04. When I run yo doctor I get the following error

$ yo doctor

/home/walid/.nvm/v0.10.36/lib/node_modules/yo/cli.js:54
    require('yeoman-doctor').run();
                             ^
TypeError: Object function () {
  var errCount = 0;

  console.log('\n' + chalk.underline.blue('Yeoman Doctor'));
  console.log('Running sanity checks on your system\n');

  eachAsync(objectValues(rules), function (rule, i, cb) {
    rule.verify(function (err) {
      console.log(err ? symbols.error : symbols.success + ' ' + rule.description);

      if (err) {
        errCount++;
        console.log(err);
      }

      cb();
    });
  }, function () {
    if (errCount === 0) {
      console.log(chalk.green('\nEverything looks all right!'));
    } else {
      console.log(chalk.red('\nFound potential issues on your machine :('));
    }
  });
} has no method 'run'
    at pre (/home/walid/.nvm/v0.10.36/lib/node_modules/yo/cli.js:54:30)
    at Object.<anonymous> (/home/walid/.nvm/v0.10.36/lib/node_modules/yo/cli.js:161:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:929:3

Is there anx fix for it?

Gargaroz commented 9 years ago

Same issue here. I'm working using Webstorm 9, on Windows 7. I created a "New Project" -> "Empty" then started with the following commands

C:\Users\gesposito\AngularJS Training\my-form>node --version && npm --version && git --version && yo --version && bower --version && grunt --version
v0.10.35
1.4.28
git version 1.9.5.msysgit.0
1.3.3
1.3.12
grunt-cli v0.1.13

C:\Users\gesposito\AngularJS Training\my-form>npm install -g npm && npm cache clean
C:\Users\gesposito\AppData\Roaming\npm\npm -> C:\Users\gesposito\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
npm@2.4.1 C:\Users\gesposito\AppData\Roaming\npm\node_modules\npm

C:\Users\gesposito\AngularJS Training\my-form>npm install --global generator-angular@0.9.2
generator-angular@0.9.2 C:\Users\gesposito\AppData\Roaming\npm\node_modules\generator-angular
├── chalk@0.4.0 (has-color@0.1.7, ansi-styles@1.0.0, strip-ansi@0.1.1)
├── yosay@0.2.1 (pad-component@0.0.1, word-wrap@0.1.3, minimist@0.0.9)
├── wiredep@1.8.6 (propprop@0.3.0, minimist@1.1.0, lodash@2.4.1, through2@0.6.3, chalk@0.5.1, bower-config@0.5.2, glob@4.3.5)
└── yeoman-generator@0.16.0 (dargs@0.1.0, diff@1.0.8, debug@0.7.4, class-extend@0.1.1, rimraf@2.2.8, findup-sync@0.1.3, text-table@0.2.0, mime@1.2.11, async@0.2.10, mkdirp@0.3.5, isbinaryfile@2.0.
3, shelljs@0.2.6, underscore.string@2.3.3, iconv-lite@0.2.11, lodash@2.4.1, glob@3.2.11, file-utils@0.1.5, cheerio@0.13.1, inquirer@0.4.1, request@2.30.0, download@0.1.19)

So, by doing C:\Users\gesposito\AngularJS Training\my-form>yo yeoman prompted to update the angular generator, and I updated both my generators, angular and karma.

Then I tried to run thr angular-generator and ended in a bunch of errors

? Would you like to use Sass (with Compass)? No
? Would you like to include Bootstrap? Yes
? Which modules would you like to include? angular-animate.js, angular-cookies.js, angular-resource.js, angular-route.js, angular-sanitize.js, angular-touch.js
   create app\styles\main.css
   create app\index.html
   create bower.json
   create .bowerrc
   create package.json
   create Gruntfile.js
   invoke   angular:common:C:\Users\gesposito\AppData\Roaming\npm\node_modules\generator-angular\app\index.js
   create     .editorconfig
   create     .gitattributes
   create     .jshintrc
   create     .gitignore
   create     test\.jshintrc
   create     app\.buildignore
   create     app\.htaccess
   create     app\404.html
   create     app\favicon.ico
   create     app\robots.txt
   create     app\views\main.html
   create     app\images\yeoman.png
   invoke   angular:main:C:\Users\gesposito\AppData\Roaming\npm\node_modules\generator-angular\app\index.js
   create     app\scripts\app.js
   invoke   angular:controller:C:\Users\gesposito\AppData\Roaming\npm\node_modules\generator-angular\app\index.js
   create     app\scripts\controllers\main.js
   create     test\spec\controllers\main.js
   invoke   karma:app

I'm all done. Running bower install & npm install for you to install the required dependencies. If this fails, try running the command yourself.

   invoke       angular:route
   invoke           angular:controller:C:\Users\gesposito\AppData\Roaming\npm\node_modules\generator-angular\route\index.js
   create             app\scripts\controllers\about.js
   create             test\spec\controllers\about.js
   invoke           angular:view:C:\Users\gesposito\AppData\Roaming\npm\node_modules\generator-angular\route\index.js
   create             app\views\about.html
   create     test\karma.conf.js
   create     .travis.yml
npm WARN npmpackage.json  myform@0.0.0 No description
WARN npmpackage.json  myform@0.0.0 No description
WARNnpm  package.json myform@0.0.0 No repository field.
WARN package.json myform@0.0.0 No repository field.
npm WARN package.jsonnpm  myform@0.0.0 No README data
WARN package.json myform@0.0.0 No README data
bower json3#^3.3.0              cached git://github.com/bestiejs/json3.git#3.3.2
bower json3#^3.3.0            validate 3.3.2 against git://github.com/bestiejs/json3.git#^3.3.0
angular-cookies#^1.3.0    cached git://github.com/angular/bower-angular-cookies.git#1.3.11
bower angular-cookies#^1.3.0  validate 1.3.11 against git://github.com/angular/bower-angular-cookies.git#^1.3.0
bower angular#^1.3.0            cached git://github.com/angular/bower-angular.git#1.3.11
bower angular#^1.3.0          validate 1.3.11 against git://github.com/angular/bower-angular.git#^1.3.0
bower angular-sanitize#^1.3.0   cached git://github.com/angular/bower-angular-sanitize.git#1.3.11
bower angular-sanitize#^1.3.0 validate 1.3.11 against git://github.com/angular/bower-angular-sanitize.git#^1.3.0
bower angular-mocks#~1.3.0      cached git://github.com/angular/bower-angular-mocks.git#1.3.11
bower angular-mocks#~1.3.0    validate 1.3.11 against git://github.com/angular/bower-angular-mocks.git#~1.3.0
bower es5-shim#^4.0.0           cached git://github.com/es-shims/es5-shim.git#4.0.6
bower es5-shim#^4.0.0         validate 4.0.6 against git://github.com/es-shims/es5-shim.git#^4.0.0
bower angular-animate#^1.3.0    cached git://github.com/angular/bower-angular-animate.git#1.3.11
bower angular-animate#^1.3.0  validate 1.3.11 against git://github.com/angular/bower-angular-animate.git#^1.3.0
bower bootstrap#^3.2.0          cached git://github.com/twbs/bootstrap.git#3.3.2
bower bootstrap#^3.2.0        validate 3.3.2 against git://github.com/twbs/bootstrap.git#^3.2.0
bower angular-touch#^1.3.0      cached git://github.com/angular/bower-angular-touch.git#1.3.11
bower angular-touch#^1.3.0    validate 1.3.11 against git://github.com/angular/bower-angular-touch.git#^1.3.0
bower angular-scenario#~1.3.0   cached git://github.com/angular/bower-angular-scenario.git#1.3.11
bower angular-scenario#~1.3.0 validate 1.3.11 against git://github.com/angular/bower-angular-scenario.git#~1.3.0
bower angular-resource#^1.3.0   cached git://github.com/angular/bower-angular-resource.git#1.3.11
bower angular-resource#^1.3.0 validate 1.3.11 against git://github.com/angular/bower-angular-resource.git#^1.3.0
      cached git://github.com/angular/bower-angular-route.git#1.3.11
bower angular-route#^1.3.0    validate 1.3.11 against git://github.com/angular/bower-angular-route.git#^1.3.0
npm WARN excluding symbolic link build\defs-config.json -> ../defs-config.json
bower jquery#>= 1.9.1           cached git://github.com/jquery/jquery.git#2.1.3
bower jquery#>= 1.9.1         validate 2.1.3 against git://github.com/jquery/jquery.git#>= 1.9.1
bower json3#^3.3.0             install json3#3.3.2
bower angular#^1.3.0           install angular#1.3.11
bower es5-shim#^4.0.0          install es5-shim#4.0.6
bower angular-mocks#~1.3.0     install angular-mocks#1.3.11
bower angular-animate#^1.3.0   install angular-animate#1.3.11
bower angular-cookies#^1.3.0   install angular-cookies#1.3.11
bower angular-sanitize#^1.3.0  install angular-sanitize#1.3.11
bower angular-resource#^1.3.0  install angular-resource#1.3.11
bower angular-touch#^1.3.0     install angular-touch#1.3.11
bower angular-scenario#~1.3.0  install angular-scenario#1.3.11
bower angular-route#^1.3.0     install angular-route#1.3.11
bower bootstrap#^3.2.0         install bootstrap#3.3.2
bower jquery#>= 1.9.1          install jquery#2.1.3
/
json3#3.3.2 bower_components\json3

angular#1.3.11 bower_components\angular

es5-shim#4.0.6 bower_components\es5-shim

angular-mocks#1.3.11 bower_components\angular-mocks
└── angular#1.3.11

angular-animate#1.3.11 bower_components\angular-animate
└── angular#1.3.11

angular-cookies#1.3.11 bower_components\angular-cookies
└── angular#1.3.11

angular-sanitize#1.3.11 bower_components\angular-sanitize
└── angular#1.3.11

angular-resource#1.3.11 bower_components\angular-resource
└── angular#1.3.11

angular-touch#1.3.11 bower_components\angular-touch
└── angular#1.3.11

angular-scenario#1.3.11 bower_components\angular-scenario
└── angular#1.3.11

angular-route#1.3.11 bower_components\angular-route
└── angular#1.3.11

bootstrap#3.3.2 bower_components\bootstrap
└── jquery#2.1.3

jquery#2.1.3 bower_components\jquery
/

> phantomjs@1.9.15 install C:\Users\gesposito\AngularJS Training\my-form\node_modules\karma-phantomjs-launcher\node_modules\phantomjs
> node install.js

Download already available at C:\Users\GESPOS~1\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip
Extracting zip contents
Removing C:\Users\gesposito\AngularJS Training\my-form\node_modules\karma-phantomjs-launcher\node_modules\phantomjs\lib\phantom
Copying extracted folder C:\Users\GESPOS~1\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip-extract-1422890184843\phantomjs-1.9.8-windows -> C:\Users\gesposito\AngularJS Training\my-form\n
ode_modules\karma-phantomjs-launcher\node_modules\phantomjs\lib\phantom
Writing location.js file
Done. Phantomjs binary available at C:\Users\gesposito\AngularJS Training\my-form\node_modules\karma-phantomjs-launcher\node_modules\phantomjs\lib\phantom\phantomjs.exe
npm WARN optional dep failed, continuing fsevents@0.3.5
npm ERR! Error: ENOENT, lstat 'C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt\node_modules\glob\node_modules\graceful-fs\graceful-fs.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Users\gesposito\AngularJS Training\my-form
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! path C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt\node_modules\glob\node_modules\graceful-fs\graceful-fs.js
npm ERR! fstream_path C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt\node_modules\glob\node_modules\graceful-fs\graceful-fs.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:287:26
npm ERR! fstream_stack Object.oncomplete (evalmachine.<anonymous>:108:15)
npm ERR! fetch failed https://registry.npmjs.org/is-upper-case/-/is-upper-case-1.1.0.tgz
npm ERR! Error: ENOENT, lstat 'C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt\node_modules\js-yaml\node_modules\argparse\node_modules\underscore.string\gulpfile.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Users\gesposito\AngularJS Training\my-form
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! path C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt\node_modules\js-yaml\node_modules\argparse\node_modules\underscore.string\gulpfile.js
npm ERR! fstream_path C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt\node_modules\js-yaml\node_modules\argparse\node_modules\underscore.string\gulpfile.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:287:26
npm ERR! fstream_stack Object.oncomplete (evalmachine.<anonymous>:108:15)
npm ERR! Error: ENOENT, lstat 'C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt\node_modules\js-yaml\node_modules\argparse\node_modules\underscore\underscore-min.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Users\gesposito\AngularJS Training\my-form
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! path C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt\node_modules\js-yaml\node_modules\argparse\node_modules\underscore\underscore-min.js
npm ERR! fstream_path C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt\node_modules\js-yaml\node_modules\argparse\node_modules\underscore\underscore-min.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:287:26
npm ERR! fstream_stack Object.oncomplete (evalmachine.<anonymous>:108:15)
-

> ws@0.4.32 install C:\Users\gesposito\AngularJS Training\my-form\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

C:\Users\gesposito\AngularJS Training\my-form\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bi
n\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
npm ERR! Error: EPERM, unlink 'C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt\node_modules\js-yaml\node_modules\argparse\node_modules\underscore\underscore-min.js'
npm ERR!  { [Error: EPERM, unlink 'C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt\node_modules\js-yaml\node_modules\argparse\node_modules\underscore\underscore-min.js']
npm ERR!   errno: 50,
npm ERR!   code: 'EPERM',
npm ERR!   path: 'C:\\Users\\gesposito\\AngularJS Training\\my-form\\node_modules\\grunt\\node_modules\\js-yaml\\node_modules\\argparse\\node_modules\\underscore\\underscore-min.js' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "karma-phantomjs-launcher" "karma-jasmine" "grunt-karma" "--save-
dev"
npm ERR! cwd C:\Users\gesposito\AngularJS Training\my-form
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! path C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt\node_modules\js-yaml\node_modules\argparse\node_modules\underscore\underscore-min.js
npm ERR! code EPERM
npm ERR! errno 50
npm ERR! stack Error: EPERM, unlink 'C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt\node_modules\js-yaml\node_modules\argparse\node_modules\underscore\underscore-min.js'
npm ERR! not ok code 0
npm WARN optional dep failed, continuing imagemin-jpegtran@1.0.0

> pngquant-bin@1.0.1 postinstall C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-pngquant\node_modules\pngquant-bin
> node lib/install.js

     fetch : https://raw.github.com/imagemin/pngquant-bin/v1.0.1/vendor/win/pngquant.exe
  progress : [====================] 100% 0.0s

V pre-build test passed successfully!
npm WARN optional dep failed, continuing imagemin-optipng@1.0.0
npm WARN optional dep failed, continuing imagemin-gifsicle@1.0.0
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\gesposito\AngularJS Training\my-form\npm-debug.log
npm ERR! not ok code 0
app/index.html modified.

     _-----_
    |       |    .---------------------------------------.
    |--(o)--|    |        Bye from us! Chat soon.        |
   `---------´   |                                       |
    ( _´U`_ )    |            The Yeoman Team            |
    /___A___\    | https://github.com/yeoman/yeoman#team |
     |  ~  |     '---------------------------------------'
   __'.___.'__
 ´   `  |° ´ Y `

So I cleaned the cache, and tried to re-run the angular generator, overwriting all the stuff he asked me to, and by the end of the re-run process all seemed fine to me

? Would you like to use Sass (with Compass)? No
? Would you like to include Bootstrap? Yes
? Which modules would you like to include? angular-animate.js, angular-cookies.js, angular-resource.js, angular-route.js, angular-sanitize.js, angular-touch.js
identical app\styles\main.css
 conflict app\index.html
? Overwrite app\index.html? overwrite this and all others
    force app\index.html
identical bower.json
identical .bowerrc
    force package.json
identical Gruntfile.js
   invoke   angular:common:C:\Users\gesposito\AppData\Roaming\npm\node_modules\generator-angular\app\index.js
identical     .editorconfig
identical     .gitattributes
identical     .jshintrc
identical     .gitignore
identical     test\.jshintrc
identical     app\.buildignore
identical     app\.htaccess
identical     app\404.html
identical     app\favicon.ico
identical     app\robots.txt
identical     app\views\main.html
identical     app\images\yeoman.png
   invoke   angular:main:C:\Users\gesposito\AppData\Roaming\npm\node_modules\generator-angular\app\index.js
 conflict     app\scripts\app.js
? Overwrite app\scripts\app.js? overwrite this and all others
    force     app\scripts\app.js
   invoke   angular:controller:C:\Users\gesposito\AppData\Roaming\npm\node_modules\generator-angular\app\index.js
identical     app\scripts\controllers\main.js
identical     test\spec\controllers\main.js
   invoke   karma:app

I'm all done. Running bower install & npm install for you to install the required dependencies. If this fails, try running the command yourself.

   invoke       angular:route
   invoke           angular:controller:C:\Users\gesposito\AppData\Roaming\npm\node_modules\generator-angular\route\index.js
identical             app\scripts\controllers\about.js
identical             test\spec\controllers\about.js
   invoke           angular:view:C:\Users\gesposito\AppData\Roaming\npm\node_modules\generator-angular\route\index.js
identical             app\views\about.html
identical     test\karma.conf.js
identical     .travis.yml
npmnpm  WARNWARN  package.jsonpackage.json myform@0.0.0 No description
 myform@0.0.0 No description
npmnpm  WARNWARN  package.jsonpackage.json myform@0.0.0 No repository field.
 myform@0.0.0 No repository field.
npmnpm  WARNWARN  package.jsonpackage.json myform@0.0.0 No README data
 myform@0.0.0 No README data
npm npm WARN WARNpackage.json  karma-phantomjs-launcher@0.1.4 No README data
package.json karma-phantomjs-launcher@0.1.4 No README data
npm WARN unmet dependency C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-gifsicle\node_modules\gifsicle\node_modules\
bin-build\node_modules\download requires ware@'^1.0.1' but will load
npm WARN unmet dependency C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\ware,
npm WARN unmet dependency which is version 0.3.0
npm WARN unmet dependency C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-jpegtran\node_modules\jpegtran-bin\node_modu
les\bin-wrapper\node_modules\download requires ware@'^1.0.1' but will load
npm WARN unmet dependency C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\ware,
npm WARN unmet dependency which is version 0.3.0
grunt@0.4.5 node_modules\grunt
├── dateformat@1.0.2-1.2.3
├── which@1.0.8
├── eventemitter2@0.4.14
├── getobject@0.1.0
├── rimraf@2.2.8
├── colors@0.6.2
├── async@0.1.22
├── hooker@0.2.3
├── grunt-legacy-util@0.2.0
├── exit@0.1.2
├── lodash@0.9.2
├── iconv-lite@0.2.11
├── coffee-script@1.3.3
├── underscore.string@2.2.1
├── grunt-legacy-log@0.1.1 (lodash@2.4.1, underscore.string@2.3.3)
├── nopt@1.0.10 (abbrev@1.0.5)
├── minimatch@0.2.14 (lru-cache@2.5.0, sigmund@1.0.0)
├── glob@3.1.21 (inherits@1.0.0, graceful-fs@1.2.3)
├── findup-sync@0.1.3 (lodash@2.4.1, glob@3.2.11)
└── js-yaml@2.0.5 (esprima@1.0.4, argparse@0.1.16)
app/index.html modified.
-
> phantomjs@1.9.15 install C:\Users\gesposito\AngularJS Training\my-form\node_modules\karma-phantomjs-launcher\node_modules\phantomjs
> node install.js

Download already available at C:\Users\GESPOS~1\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip
Extracting zip contents
Removing C:\Users\gesposito\AngularJS Training\my-form\node_modules\karma-phantomjs-launcher\node_modules\phantomjs\lib\phantom
Copying extracted folder C:\Users\GESPOS~1\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip-extract-1422890767978\phantomjs-1.9.8-windows -> C:\Users\gesposito\AngularJS Training\my-form\n
ode_modules\karma-phantomjs-launcher\node_modules\phantomjs\lib\phantom
Writing location.js file
Done. Phantomjs binary available at C:\Users\gesposito\AngularJS Training\my-form\node_modules\karma-phantomjs-launcher\node_modules\phantomjs\lib\phantom\phantomjs.exe
npm WARN unmet dependency C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-gifsicle\node_modules\gifsicle\node_modules\
bin-build\node_modules\download requires ware@'^1.0.1' but will load
npm WARN unmet dependency C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\ware,
npm WARN unmet dependency which is version 0.3.0
npm WARN unmet dependency C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-jpegtran\node_modules\jpegtran-bin\node_modu
les\bin-wrapper\node_modules\download requires ware@'^1.0.1' but will load
npm WARN unmet dependency C:\Users\gesposito\AngularJS Training\my-form\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\ware,
npm WARN unmet dependency which is version 0.3.0
karma-jasmine@0.3.5 node_modules\karma-jasmine

grunt-karma@0.10.1 node_modules\grunt-karma
└── lodash@2.4.1

karma-phantomjs-launcher@0.1.4 node_modules\karma-phantomjs-launcher
└── phantomjs@1.9.15 (which@1.0.8, progress@1.1.8, kew@0.4.0, adm-zip@0.4.4, request-progress@0.3.1, fs-extra@0.16.3, npmconf@2.0.9, request@2.42.0)

     _-----_
    |       |    .---------------------------------------.
    |--(o)--|    |        Bye from us! Chat soon.        |
   `---------´   |                                       |
    ( _´U`_ )    |            The Yeoman Team            |
    /___A___\    | https://github.com/yeoman/yeoman#team |
     |  ~  |     '---------------------------------------'
   __'.___.'__
 ´   `  |° ´ Y `

Finally I stepped into the same error reported by @lidolee; I tried to reinstall globally yeoman, but even when I cleaned the npm cache, the same issue popped out

C:\Users\gesposito\AngularJS Training\my-form>yo doctor

C:\Users\gesposito\AppData\Roaming\npm\node_modules\yo\cli.js:54
    require('yeoman-doctor').run();
                             ^
TypeError: Object function () {
  var errCount = 0;

  console.log('\n' + chalk.underline.blue('Yeoman Doctor'));
  console.log('Running sanity checks on your system\n');

  eachAsync(objectValues(rules), function (rule, i, cb) {
    rule.verify(function (err) {
      console.log(err ? symbols.error : symbols.success + ' ' + rule.description);

      if (err) {
        errCount++;
        console.log(err);
      }

      cb();
    });
  }, function () {
    if (errCount === 0) {
      console.log(chalk.green('\nEverything looks all right!'));
    } else {
      console.log(chalk.red('\nFound potential issues on your machine :('));
    }
  });
} has no method 'run'
    at pre (C:\Users\gesposito\AppData\Roaming\npm\node_modules\yo\cli.js:54:30)
    at Object.<anonymous> (C:\Users\gesposito\AppData\Roaming\npm\node_modules\yo\cli.js:161:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:929:3

C:\Users\gesposito\AngularJS Training\my-form>npm install -g yo
C:\Users\gesposito\AppData\Roaming\npm\yo -> C:\Users\gesposito\AppData\Roaming\npm\node_modules\yo\cli.js

> yo@1.3.3 postinstall C:\Users\gesposito\AppData\Roaming\npm\node_modules\yo
> yodoctor

Yeoman Doctor
Running sanity checks on your system

V Global configuration file is valid
V NODE_PATH matches the npm root
V No .bowerrc file in home directory
V No .yo-rc.json file in home directory

Everything looks all right!
yo@1.3.3 C:\Users\gesposito\AppData\Roaming\npm\node_modules\yo
├── is-root@1.0.0
├── sudo-block@1.1.0
├── fullname@1.0.0
├── opn@1.0.1
├── underscore.string@2.4.0
├── async@0.9.0
├── shelljs@0.3.0
├── lodash@2.4.1
├── chalk@0.5.1 (escape-string-regexp@1.0.2, ansi-styles@1.1.0, supports-color@0.2.0, strip-ansi@0.3.0, has-ansi@0.1.0)
├── string-length@1.0.0 (strip-ansi@2.0.1)
├── yeoman-character@1.0.1 (supports-color@1.2.0)
├── nopt@3.0.1 (abbrev@1.0.5)
├── findup@0.1.5 (commander@2.1.0, colors@0.6.2)
├── multiline@1.0.2 (strip-indent@1.0.0)
├── configstore@0.3.2 (object-assign@2.0.0, xdg-basedir@1.0.1, user-home@1.1.1, osenv@0.1.0, graceful-fs@3.0.5, uuid@2.0.1, mkdirp@0.5.0, js-yaml@3.2.5)
├── yosay@1.0.2 (ansi-regex@1.1.0, ansi-styles@2.0.0, strip-ansi@2.0.1, pad-component@0.0.1, word-wrap@1.0.0, minimist@1.1.0, taketalk@1.0.0)
├── update-notifier@0.2.2 (is-npm@1.0.0, semver-diff@2.0.0, latest-version@1.0.0)
├── yeoman-doctor@1.3.1 (log-symbols@1.0.1, object-values@1.0.0, user-home@1.1.1, each-async@1.1.1, twig@0.7.2)
├── insight@0.4.3 (object-assign@1.0.0, tough-cookie@0.12.1, os-name@1.0.3, lodash.debounce@2.4.1, request@2.52.0, inquirer@0.6.0)
├── yeoman-environment@1.2.1 (log-symbols@1.0.1, diff@1.2.2, text-table@0.2.0, untildify@1.0.0, grouped-queue@0.3.0, debug@2.1.1, globby@1.1.0, mem-fs@1.0.1, inquirer@0.8.0)
└── yeoman-generator@0.17.7 (dargs@2.1.0, diff@1.2.2, class-extend@0.1.1, rimraf@2.2.8, text-table@0.2.0, mime@1.2.11, debug@1.0.4, isbinaryfile@2.0.3, grouped-queue@0.3.0, mkdirp@0.5.0, iconv-lit
e@0.4.6, run-async@0.1.0, glob@4.3.5, cross-spawn@0.2.3, request@2.52.0, findup-sync@0.1.3, file-utils@0.2.1, github-username@1.1.1, cheerio@0.17.0, download@1.0.7, gruntfile-editor@0.2.0, inquire
r@0.7.3)

C:\Users\gesposito\AngularJS Training\my-form>yo doctor

C:\Users\gesposito\AppData\Roaming\npm\node_modules\yo\cli.js:54
    require('yeoman-doctor').run();
                             ^
TypeError: Object function () {
  var errCount = 0;

  console.log('\n' + chalk.underline.blue('Yeoman Doctor'));
  console.log('Running sanity checks on your system\n');

  eachAsync(objectValues(rules), function (rule, i, cb) {
    rule.verify(function (err) {
      console.log(err ? symbols.error : symbols.success + ' ' + rule.description);

      if (err) {
        errCount++;
        console.log(err);
      }

      cb();
    });
  }, function () {
    if (errCount === 0) {
      console.log(chalk.green('\nEverything looks all right!'));
    } else {
      console.log(chalk.red('\nFound potential issues on your machine :('));
    }
  });
} has no method 'run'
    at pre (C:\Users\gesposito\AppData\Roaming\npm\node_modules\yo\cli.js:54:30)
    at Object.<anonymous> (C:\Users\gesposito\AppData\Roaming\npm\node_modules\yo\cli.js:161:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:929:3
C:\Users\gesposito\AngularJS Training\my-form>npm cache clean

C:\Users\gesposito\AngularJS Training\my-form>npm install -g yo
npm ERR! fetch failed https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz
C:\Users\gesposito\AppData\Roaming\npm\yo -> C:\Users\gesposito\AppData\Roaming\npm\node_modules\yo\cli.js

> yo@1.3.3 postinstall C:\Users\gesposito\AppData\Roaming\npm\node_modules\yo
> yodoctor

Yeoman Doctor
Running sanity checks on your system

V Global configuration file is valid
V NODE_PATH matches the npm root
V No .bowerrc file in home directory
V No .yo-rc.json file in home directory

Everything looks all right!
yo@1.3.3 C:\Users\gesposito\AppData\Roaming\npm\node_modules\yo
├── is-root@1.0.0
├── sudo-block@1.1.0
├── fullname@1.0.0
├── opn@1.0.1
├── underscore.string@2.4.0
├── async@0.9.0
├── shelljs@0.3.0
├── lodash@2.4.1
├── string-length@1.0.0 (strip-ansi@2.0.1)
├── nopt@3.0.1 (abbrev@1.0.5)
├── chalk@0.5.1 (escape-string-regexp@1.0.2, ansi-styles@1.1.0, supports-color@0.2.0, strip-ansi@0.3.0, has-ansi@0.1.0)
├── yeoman-character@1.0.1 (supports-color@1.2.0)
├── findup@0.1.5 (commander@2.1.0, colors@0.6.2)
├── multiline@1.0.2 (strip-indent@1.0.0)
├── yosay@1.0.2 (ansi-regex@1.1.0, ansi-styles@2.0.0, strip-ansi@2.0.1, pad-component@0.0.1, word-wrap@1.0.0, minimist@1.1.0, taketalk@1.0.0)
├── configstore@0.3.2 (object-assign@2.0.0, xdg-basedir@1.0.1, user-home@1.1.1, osenv@0.1.0, graceful-fs@3.0.5, uuid@2.0.1, mkdirp@0.5.0, js-yaml@3.2.5)
├── update-notifier@0.2.2 (is-npm@1.0.0, semver-diff@2.0.0, latest-version@1.0.0)
├── yeoman-doctor@1.3.1 (log-symbols@1.0.1, object-values@1.0.0, user-home@1.1.1, each-async@1.1.1, twig@0.7.2)
├── yeoman-environment@1.2.1 (log-symbols@1.0.1, diff@1.2.2, untildify@1.0.0, text-table@0.2.0, grouped-queue@0.3.0, debug@2.1.1, globby@1.1.0, mem-fs@1.0.1, inquirer@0.8.0)
├── yeoman-generator@0.17.7 (dargs@2.1.0, diff@1.2.2, class-extend@0.1.1, rimraf@2.2.8, text-table@0.2.0, mime@1.2.11, debug@1.0.4, isbinaryfile@2.0.3, grouped-queue@0.3.0, iconv-lite@0.4.6, mkdir
p@0.5.0, cross-spawn@0.2.3, run-async@0.1.0, findup-sync@0.1.3, file-utils@0.2.1, glob@4.3.5, github-username@1.1.1, request@2.52.0, cheerio@0.17.0, download@1.0.7, gruntfile-editor@0.2.0, inquire
r@0.7.3)
└── insight@0.4.3 (object-assign@1.0.0, os-name@1.0.3, tough-cookie@0.12.1, lodash.debounce@2.4.1, request@2.52.0, inquirer@0.6.0)

C:\Users\gesposito\AngularJS Training\my-form>yo doctor

C:\Users\gesposito\AppData\Roaming\npm\node_modules\yo\cli.js:54
    require('yeoman-doctor').run();
                             ^
TypeError: Object function () {
  var errCount = 0;

  console.log('\n' + chalk.underline.blue('Yeoman Doctor'));
  console.log('Running sanity checks on your system\n');

  eachAsync(objectValues(rules), function (rule, i, cb) {
    rule.verify(function (err) {
      console.log(err ? symbols.error : symbols.success + ' ' + rule.description);

      if (err) {
        errCount++;
        console.log(err);
      }

      cb();
    });
  }, function () {
    if (errCount === 0) {
      console.log(chalk.green('\nEverything looks all right!'));
    } else {
      console.log(chalk.red('\nFound potential issues on your machine :('));
    }
  });
} has no method 'run'
    at pre (C:\Users\gesposito\AppData\Roaming\npm\node_modules\yo\cli.js:54:30)
    at Object.<anonymous> (C:\Users\gesposito\AppData\Roaming\npm\node_modules\yo\cli.js:161:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:929:3

C:\Users\gesposito\AngularJS Training\my-form>

Calling all the fixers.

SBoudrias commented 9 years ago

It been fixed on latest yo, so update yo. npm -g update yo

Sorry for the trouble.

Gargaroz commented 9 years ago

I managed to install npm 2.1.0 following the first option here https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows

I restarted Windows and here's my situation now

C:\Users\gesposito\AngularJS Training\my-form>node --version && npm --version && git --version && yo --version && bower --version && grunt --version
v0.10.35
2.1.0
git version 1.9.5.msysgit.0
1.3.3
1.3.12
grunt-cli v0.1.13
grunt v0.4.5

BUT now I'm able no more to install the generator-angular as shown here http://yeoman.io/codelab/install-generators.html

C:\Users\gesposito\AngularJS Training\my-form>npm install --global generator-angular@0.9.2
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "node" "C:\\Users\\gesposito\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "--global" "generator-angular@0.9.2"
npm ERR! node v0.10.35
npm ERR! npm  v2.1.0

npm ERR! Attempt to unlock generator-angular, which hasn't been locked
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\gesposito\AngularJS Training\my-form\npm-debug.log

I took a look at the yeoman menu and tried to install the generator-angular from there, but I wasn't able to find the very "generator-angular" in the list of angular related generators prompted by yeoman itself.

So... I'm stuck in the middle with you.

ghost commented 9 years ago

@Gargaroz Try this, for me it was working:

$ npm cache clean -f
$ npm install -g npm
$ npm install -g yo

after that, yo doctor was finally working again:

$ yo doctor

Yeoman Doctor
Running sanity checks on your system

✔ No .bowerrc file in home directory
✔ Global configuration file is valid
✔ No .yo-rc.json file in home directory
✔ NODE_PATH matches the npm root

Everything looks all right!
Gargaroz commented 9 years ago

@lidolee Should I reinstall npm even if I successfully installed the 2.1.0 version?

ghost commented 9 years ago

I had npm vesion 2.1.0 as well. For me it worked after updating it. It's weird I know, but it was successfull. Usually it should work with npm 2.1.0, at least this is what is required.

Gargaroz commented 9 years ago

@lidolee Big nopes here

C:\Users\gesposito\AngularJS Training\my-form>npm cache clean -f
npm WARN using --force I sure hope you know what you are doing.

C:\Users\gesposito\AngularJS Training\my-form>npm install -g npm
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "node" "C:\\Users\\gesposito\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "npm"
npm ERR! node v0.10.35
npm ERR! npm  v2.1.0

npm ERR! Attempt to unlock npm, which hasn't been locked
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\gesposito\AngularJS Training\my-form\npm-debug.log

Now I'm looking to this solution https://github.com/npm/npm/issues/4815#issuecomment-48080140

BUT can't find the "Windows way", just linux and mac ones.

SBoudrias commented 9 years ago

This is an issue with npm, like the debug log says, open an issue over there for support.