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

Existing Yeoman generator and npm link #1618

Closed
StfBauer opened this issue Jun 7, 2016 · 8 comments
Closed

Existing Yeoman generator and npm link #1618

StfBauer opened this issue Jun 7, 2016 · 8 comments

Comments

@StfBauer
Copy link

StfBauer commented Jun 7, 2016

I have some local generators that I currently use. Those generators worked with older version just fine. Now I have the problem that npm link doesn't work anymore and the generator won't be detected.
I am running on OS X 10.11.5.

node: 3.5.3
npm: v4.2.1

Yeoman Doctor
Running sanity checks on your system

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

Everything looks all right!

When I take a look at the global node modules the generator link to the correct folder. Are there some things I currently miss out. I also checked the guidande on yeoman.io.

@eddiemonge
Copy link
Member

what do you mean "doesn't work anymore"? Can you be more specific please?

@StfBauer
Copy link
Author

StfBauer commented Jun 7, 2016

I 'npm link' the generator but when I try 'yo ' It says that the generator is not available, but linked in global npm packages. Worked before.

Error <generator> 

You don't seem to have a generator with the name <generator> installed.
You can see available generators with npm search yeoman-generator and then install them with npm install [name].
To see the 61 registered generators run yo with the `--help` option.

Not sure what I'm doing wrong. Changed real name of generators to because there are more than one affected.

@SBoudrias
Copy link
Member

@StfBauer you can run with DEBUG=yeoman:* yo and get more insight into the paths yo is exploring.

@StfBauer
Copy link
Author

StfBauer commented Jun 7, 2016

All generators listed in the directories work fine but somehow the links in this folder cannot be resolved.
Any hint on that?

drwxr-xr-x  18 stefanbauer  staff   612  7 Jun 01:52 .
drwxr-xr-x   3 stefanbauer  staff   102  6 Mai 14:59 ..
drwxr-xr-x  22 stefanbauer  staff   748  7 Jun 01:26 generator-angular
drwxr-xr-x  55 stefanbauer  staff  1870  7 Jun 01:26 generator-aspnet
lrwxr-xr-x   1 stefanbauer  staff    40  7 Jun 01:46 generator-displaytemplates -> /Volumes/Code/generator-displaytemplates
drwxr-xr-x  14 stefanbauer  staff   476 16 Mai 17:43 generator-element
drwxr-xr-x   6 stefanbauer  staff   204  7 Jun 01:26 generator-generator
drwxr-xr-x   6 stefanbauer  staff   204  7 Jun 01:26 generator-karma
drwxr-xr-x   8 stefanbauer  staff   272  7 Jun 01:26 generator-office
drwxr-xr-x  12 stefanbauer  staff   408 18 Mai 14:15 generator-polymer
drwxr-xr-x  12 stefanbauer  staff   408 16 Mai 16:34 generator-sharepoint
lrwxr-xr-x   1 stefanbauer  staff    44  7 Jun 01:52 generator-simplestyle -> /Volumes/Code/projects/generator-simplestyle
drwxr-xr-x   6 stefanbauer  staff   204  7 Jun 01:26 generator-webapp
drwxr-xr-x  11 stefanbauer  staff   374  6 Mai 14:59 jshint
drwxr-xr-x  25 stefanbauer  staff   850  6 Mai 15:30 npm
drwxr-xr-x  21 stefanbauer  staff   714  5 Jun 14:51 tslint
drwxr-xr-x  13 stefanbauer  staff   442  5 Jun 14:51 typescript
drwxr-xr-x   6 stefanbauer  staff   204  7 Jun 00:06 yo

@SBoudrias
Copy link
Member

If you run which yo, does it point to the yo in that folder? My guess is that it doesn't. You might have two version of yo installed.

@StfBauer
Copy link
Author

StfBauer commented Jun 7, 2016

Yeah you are right it doesn't point to the folder. So uninstall everything yo related and reinstall?

@SBoudrias
Copy link
Member

@StfBauer it's an issue with npm and the way it is setup. My guess is you also have two npm installed.

@StfBauer
Copy link
Author

StfBauer commented Jun 7, 2016

@SBoudrias Fixed it. Trashed NodeJS installation and reinstalled. Works now. Thank you for your support.

@StfBauer StfBauer closed this as completed Jun 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants