简体   繁体   中英

Yo generator subgenerator not available. When doing an NPM install it doesn't pull all the code down

I'm working on creating an Yo generator to generate hapijs modules. I've published this to NPM and when I create a new project and do an npm install generator-hapijs , it doesn't pull all the code down into my node_modules/generator-hapijs directory and therefore my subgenerator is not available when doing a yo --help . Why not and how can I fix this?

Here's my code: https://github.com/toymachiner62/generator-hapijs

Here's what's available in my node_modules/generator-hapijs folder when installing this package in a new project:

-/project
--/node_modules
---/generator-hapijs
----/app
----/node_modules
----package.json
----README.md

It had nothing to do with yeoman and yo, but rather had to do with the fact that I had a files array in my package.json and it only contained app so when installing it only installed files from the /app folder.

I just removed the files array from my package.json file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM