You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C:\Program Files\nodejs\node_modules\yo\node_modules\update-notifier\index.js:32
throw new Error('pkg.name and pkg.version required');
^
Error: pkg.name and pkg.version required
at new UpdateNotifier (C:\Program Files\nodejs\node_modules\yo\node_modules\update-notifier\index.js:32:10)
at module.exports (C:\Program Files\nodejs\node_modules\yo\node_modules\update-notifier\index.js:150:25)
at resolveGenerators (C:\Program Files\nodejs\node_modules\yo\lib\router.js:74:20)
at Router.updateAvailableGenerators (C:\Program Files\nodejs\node_modules\yo\lib\router.js:84:7)
at runYo (C:\Program Files\nodejs\node_modules\yo\lib\cli.js:188:10)
at init (C:\Program Files\nodejs\node_modules\yo\lib\cli.js:149:5)
at pre (C:\Program Files\nodejs\node_modules\yo\lib\cli.js:89:3)
at Object.<anonymous> (C:\Program Files\nodejs\node_modules\yo\lib\cli.js:219:3)
at Module._compile (node:internal/modules/cjs/loader:1097:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
Note: deleting or even renaming the "generator-code" folder to something else (e.g. dummy_generator-code) solves the issue.
Re-installing generator-code or removing dummy_ makes the issue re-surface. Other generators are not affected.
Node.js: version 17.3.0
npm: 8.3.0
yo: 4.3.0
generator-code: 1.6.5
The text was updated successfully, but these errors were encountered:
I'm not sure how to really fix this, but the issue is that there is a package.json file inside the generators/app folder, and yo is using that rather than the root package.json. And that nested package.json is missing required fields.
Yo stops working after installing generator-code:
Note: deleting or even renaming the "generator-code" folder to something else (e.g. dummy_generator-code) solves the issue.
Re-installing generator-code or removing dummy_ makes the issue re-surface. Other generators are not affected.
Node.js: version 17.3.0
npm: 8.3.0
yo: 4.3.0
generator-code: 1.6.5
The text was updated successfully, but these errors were encountered: