I was trying to use yo and generator-office installed via pnpm.
This line below resolves to the global/*/node_modules which is not an actual directory.
|
if (process.env.PNPM_HOME) { |
|
paths.push(resolve(process.env.PNPM_HOME, 'global/*/node_modules')); |
|
} |
When attempting to find modules in
global/*/node_modules this
existsSync(root) fails.
|
export function findPackagesIn(searchPaths: string[], packagePatterns: string[], globbyOptions?: any): any[] { |
|
searchPaths = arrify(searchPaths) |
|
.filter(Boolean) |
|
.map(npmPath => resolve(npmPath)); |
|
let modules: any[] = []; |
|
for (const root of searchPaths) { |
|
if (!existsSync(root) || (!lstatSync(root).isDirectory() && !lstatSync(root).isSymbolicLink())) { |
|
continue; |
|
} |
The result when using yo is this with generator-office installed globally with pnpm is this.
Error office
You don't seem to have a generator with the name “generator-office” installed.
But help is on the way:
You can see available generators via npm search yeoman-generator or via http://yeoman.io/generators/.
Install them with npm install generator-office.
To see all your installed generators run yo --generators. Adding the --help option will also show subgenerators.
If yo cannot find the generator, run yo doctor to troubleshoot your system.
pr to fix here #692
I was trying to use yo and generator-office installed via pnpm.
This line below resolves to the
global/*/node_moduleswhich is not an actual directory.environment/src/module-lookup.ts
Lines 273 to 275 in 9c3ae83
When attempting to find modules in
global/*/node_modulesthisexistsSync(root)fails.environment/src/module-lookup.ts
Lines 110 to 118 in 9c3ae83
The result when using yo is this with generator-office installed globally with pnpm is this.
pr to fix here #692