Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YO: command not found. On Windows 7 64bit #1659

Closed
RupenAnjaria opened this issue Feb 6, 2017 · 8 comments

Comments

@RupenAnjaria
Copy link

commented Feb 6, 2017

On my machine, see below log for installation:
`USER@ROSE MINGW64 ~/Project/forked/EXAMPLE
$ npm install -g yeoman-generator

spawn-sync@1.0.15 postinstall C:\Users\USER\AppData\Roaming\npm\node_modules\yeoman-generator\node_modules\spawn-sync
node postinstall

C:\Users\USER\AppData\Roaming\npm
-- yeoman-generator@1.1.0 +-- async@2.1.4 +-- chalk@1.1.3 | +-- ansi-styles@2.2.1 | +-- escape-string-regexp@1.0.5 | +-- has-ansi@2.0.0 | | -- ansi-regex@2.1.1
| +-- strip-ansi@3.0.1
| -- supports-color@2.0.0 +-- class-extend@0.1.2 | -- object-assign@2.1.1
+-- cli-table@0.3.1
| -- colors@1.0.3 +-- cross-spawn@4.0.2 | +-- lru-cache@4.0.2 | | +-- pseudomap@1.0.2 | | -- yallist@2.0.0
| -- which@1.2.12 | -- isexe@1.1.2
+-- dargs@4.1.0
| -- number-is-nan@1.0.1 +-- dateformat@1.0.12 | +-- get-stdin@4.0.1 | -- meow@3.7.0
| +-- camelcase-keys@2.1.0
| | -- camelcase@2.1.1 | +-- decamelize@1.2.0 | +-- loud-rejection@1.6.0 | | +-- currently-unhandled@0.4.1 | | | -- array-find-index@1.0.2
| | -- signal-exit@3.0.2 | +-- map-obj@1.0.1 | +-- normalize-package-data@2.3.5 | | +-- hosted-git-info@2.2.0 | | +-- is-builtin-module@1.0.0 | | | -- builtin-modules@1.1.1
| | +-- semver@5.3.0
| | -- validate-npm-package-license@3.0.1 | | +-- spdx-correct@1.0.2 | | | -- spdx-license-ids@1.2.2
| | -- spdx-expression-parse@1.0.4 | +-- object-assign@4.1.1 | +-- redent@1.0.0 | | +-- indent-string@2.1.0 | | | -- repeating@2.0.1
| | | -- is-finite@1.0.2 | | -- strip-indent@1.0.1
| -- trim-newlines@1.0.0 +-- debug@2.6.0 | -- ms@0.7.2
+-- detect-conflict@1.0.1
+-- error@7.0.2
| +-- string-template@0.2.1
| -- xtend@4.0.1 +-- find-up@1.1.2 | -- pinkie-promise@2.0.1
| -- pinkie@2.0.4 +-- github-username@2.1.0 | -- gh-got@2.4.0
| +-- got@5.7.1
| | +-- create-error-class@3.0.2
| | | -- capture-stack-trace@1.0.0 | | +-- duplexer2@0.1.4 | | +-- is-redirect@1.0.0 | | +-- is-retry-allowed@1.1.0 | | +-- lowercase-keys@1.0.0 | | +-- node-status-codes@1.0.0 | | +-- object-assign@4.1.1 | | +-- parse-json@2.2.0 | | | -- error-ex@1.3.0
| | | -- is-arrayish@0.2.1 | | +-- read-all-stream@3.1.0 | | +-- timed-out@3.1.3 | | +-- unzip-response@1.0.2 | | -- url-parse-lax@1.0.0
| | -- prepend-http@1.0.4 | -- object-assign@4.1.1
+-- glob@7.1.1
| +-- fs.realpath@1.0.0
| +-- inflight@1.0.6
| | -- wrappy@1.0.2 | +-- inherits@2.0.3 | +-- minimatch@3.0.3 | | -- brace-expansion@1.1.6
| | +-- balanced-match@0.4.2
| | -- concat-map@0.0.1 | -- once@1.4.0
+-- istextorbinary@2.1.0
| +-- binaryextensions@2.0.0
| +-- editions@1.3.3
| -- textextensions@2.0.1 +-- lodash@4.17.4 +-- mem-fs-editor@3.0.2 | +-- commondir@1.0.1 | +-- deep-extend@0.4.1 | +-- ejs@2.5.5 | +-- globby@6.1.0 | | +-- array-union@1.0.2 | | | -- array-uniq@1.0.3
| | +-- object-assign@4.1.1
| | -- pify@2.3.0 | +-- multimatch@2.1.0 | | +-- array-differ@1.0.0 | | -- arrify@1.0.1
| -- vinyl@2.0.1 | +-- clone@1.0.2 | +-- clone-buffer@1.0.0 | +-- clone-stats@1.0.0 | +-- cloneable-readable@1.0.0 | +-- is-stream@1.1.0 | +-- remove-trailing-separator@1.0.1 | -- replace-ext@1.0.0
+-- minimist@1.2.0
+-- mkdirp@0.5.1
| -- minimist@0.0.8 +-- path-exists@2.1.0 +-- path-is-absolute@1.0.1 +-- pretty-bytes@3.0.1 +-- read-chunk@1.0.1 +-- read-pkg-up@1.0.1 | -- read-pkg@1.1.0
| +-- load-json-file@1.1.0
| | +-- graceful-fs@4.1.11
| | -- strip-bom@2.0.0 | | -- is-utf8@0.2.1
| -- path-type@1.1.0 +-- rimraf@2.5.4 +-- run-async@2.3.0 | -- is-promise@2.1.0
+-- shelljs@0.7.6
| +-- interpret@1.0.1
| -- rechoir@0.6.2 | -- resolve@1.2.0
+-- text-table@0.2.0
+-- through2@2.0.3
| -- readable-stream@2.2.2 | +-- buffer-shims@1.0.0 | +-- core-util-is@1.0.2 | +-- isarray@1.0.0 | +-- process-nextick-args@1.0.7 | +-- string_decoder@0.10.31 | -- util-deprecate@1.0.2
+-- user-home@2.0.0
| -- os-homedir@1.0.2 -- yeoman-environment@1.6.6
+-- diff@2.2.3
+-- globby@4.1.0
| +-- glob@6.0.4
| -- object-assign@4.1.1 +-- grouped-queue@0.3.3 +-- inquirer@1.2.3 | +-- ansi-escapes@1.4.0 | +-- cli-cursor@1.0.2 | | -- restore-cursor@1.0.1
| | +-- exit-hook@1.1.1
| | -- onetime@1.1.0 | +-- cli-width@2.1.0 | +-- external-editor@1.1.1 | | +-- extend@3.0.0 | | +-- spawn-sync@1.0.15 | | | +-- concat-stream@1.6.0 | | | | -- typedarray@0.0.6
| | | -- os-shim@0.1.3 | | -- tmp@0.0.29
| | -- os-tmpdir@1.0.2 | +-- figures@1.7.0 | | -- object-assign@4.1.1
| +-- mute-stream@0.0.6
| +-- rx@4.1.0
| +-- string-width@1.0.2
| | +-- code-point-at@1.1.0
| | -- is-fullwidth-code-point@1.0.0 | -- through@2.3.8
+-- log-symbols@1.0.2
+-- mem-fs@1.1.3
| +-- vinyl@1.2.0
| | +-- clone-stats@0.0.1
| | -- replace-ext@0.0.1 | -- vinyl-file@2.0.0
| +-- strip-bom-stream@2.0.0
| | -- first-chunk-stream@2.0.0 | -- vinyl@1.2.0
| +-- clone-stats@0.0.1
| -- replace-ext@0.0.1 -- untildify@2.1.0

USER@ROSE MINGW64 ~/Project/forked/EXAMPLE
$ yo
bash: yo: command not found

USER@ROSE MINGW64 ~/Project/forked/EXAMPLE
$ npm ls -g yo
C:\Users\USER\AppData\Roaming\npm
`-- (empty)

`

below is the output of environment related command:

C:\Users\user\Project\forked\example>echo %PATH% %NO DE_PATH% && node -e "console.log(process.platform, process.versions)" && type Gr untfile.js C:\Python27\;C:\Python27\Scripts;C:\Program Files (x86)\Intel\iCLS Cli ent\;C:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windo ws\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32 \WindowsPowerShell\v1.0\;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\ System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Users\user\AppData\Roaming\npm;C:\Program Files\Mong oDB\Server\3.4\bin;C:\Program Files\Docker Toolbox;C:\Users\user\AppData\Roa ming\npm %NODE_PATH% win32 { http_parser: '2.7.0', node: '6.9.2', v8: '5.1.281.88', uv: '1.9.1', zlib: '1.2.8', ares: '1.10.1-DEV', icu: '57.1', modules: '48', openssl: '1.0.2j' } The system cannot find the file specified.

When I tried to run yo command, I receive the error mentioned in the subject.

@mischah

This comment has been minimized.

Copy link
Member

commented Feb 6, 2017

It has to do with your path variable. That is not specific to Yeoman.

But Google even helps you when you search that specific: https://www.google.de/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#safe=off&q=YO++command+not+found

@mischah mischah closed this Feb 6, 2017

@RupenAnjaria

This comment has been minimized.

Copy link
Author

commented Feb 6, 2017

Other npm packages creates Wondows Command File in AppData\Roaming\npm folder, however, I didn't see Yeoman creating the same. I believe that if Yeoman can create this file then it will fix the issue as my Path points to npm folder.

image

@mischah

This comment has been minimized.

Copy link
Member

commented Feb 6, 2017

Interesting. Gotta do some research about that.

Which Node and npm version are you using?

node --version
npm --version
@RupenAnjaria

This comment has been minimized.

Copy link
Author

commented Feb 6, 2017

NodeJS: 6.9.2
NPM: 4.1.2

@SBoudrias

This comment has been minimized.

Copy link
Member

commented Feb 7, 2017

@RupenAnjaria best guest is the npm version you used to install yo didn't install packages in AppData\Roaming\npm. The yo binary has probably be installed somewhere else by the npm version you used.

We've seen this a lot on windows with users having multiple npm instances (sometime by mistake)

@RupenAnjaria

This comment has been minimized.

Copy link
Author

commented Feb 7, 2017

@SBoudrias AppData\Roaming\npm does have binaries of yo, however since there is no hook (command file) I am unable to invoke yo from command prompt.

image

@SBoudrias

This comment has been minimized.

Copy link
Member

commented Feb 7, 2017

Oh, just saw what happened here.

You need to run npm install -g yo. yeoman-generator is the framework to allow people to write their own generator. It's not the yeoman runner. See our getting started instruction http://yeoman.io/

@RupenAnjaria

This comment has been minimized.

Copy link
Author

commented Feb 7, 2017

ahh!! let me run that command.
Thank you @SBoudrias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.