cdimascio / generator-express-no-stress

🚂 A Yeoman generator for Express.js based 12-factor apps and apis
MIT License
595 stars 82 forks source link

generator not recognized after install #28

Closed naterkane closed 5 years ago

naterkane commented 5 years ago

When trying to install then scaffold a new project... install initially succeeds, however the generator isn't found.

using node@v10.15.0 and npm@6.7.0

$ npm i -g yo generator-express-no-stress
npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
/Users/naterkane/.nvm/versions/node/v10.15.0/bin/yo-complete -> /Users/naterkane/.nvm/versions/node/v10.15.0/lib/node_modules/yo/lib/completion/index.js
/Users/naterkane/.nvm/versions/node/v10.15.0/bin/yo -> /Users/naterkane/.nvm/versions/node/v10.15.0/lib/node_modules/yo/lib/cli.js

> yo@2.0.5 postinstall /Users/naterkane/.nvm/versions/node/v10.15.0/lib/node_modules/yo
> yodoctor

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
✔ yo version

Everything looks all right!
+ yo@2.0.5
+ generator-express-no-stress@5.3.2
added 12 packages from 11 contributors and updated 301 packages in 67.33s

then

$ yo express-no-stress <project-name> --docker
Error express-no-stress <project-name> --docker

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

thoughts?

cdimascio commented 5 years ago

@naterkane thanks for the issue.

I ran through this, but am unable to reproduce

λ  /tmp yo express-no-stress app --docker
? App description [My cool app]
? API Root [/api/v1]
? Version [1.0.0]
? Linter Airbnb

   create app/Dockerfile
   create app/gitignore
   create app/package.json
   create app/public/api-explorer/favicon-16x16.png
   create app/public/api-explorer/favicon-32x32.png
...
MacOS 10.14.3
λ  /tmp node --version
v10.15.1
λ  /tmp npm --version
6.7.0
λ  /tmp yo --version
2.0.5

possibly this SO answer helps? https://stackoverflow.com/questions/22118807/yeoman-cant-recognize-a-generator-that-was-installed-globally

cdimascio commented 5 years ago

@naterkane any update.

naterkane commented 5 years ago

None. I decided to just not use yeoman and avoid the situation altogether.

The 2 minutes of convenience it would have provided was a novelty at most.

It could have had to do with yeoman not having installed correctly.. but I did test the built-ins, and they worked as expected

cdimascio commented 5 years ago

fair enough. thanks for the update