fix: always use --save with npm
this forces saving to package.json even if save=false is set in npmrc
MODIFY
src/generators/app.ts
src/generators/app.ts
@@ -480,9 +480,10 @@ class App extends Generator {
if (process.env.YARN_MUTEX) yarnOpts.mutex = process.env.YARN_MUTEX
const install = (deps: string[], opts: object) => this.yarn ? this.yarnInstall(deps, opts) : this.npmInstall(deps, opts)
const dev = this.yarn ? {dev: true} : {'save-dev': true}
+ const save = this.yarn ? {} : {save: true}
Promise.all([
install(devDependencies, {...yarnOpts, ...dev, ignoreScripts: true}),
- install(dependencies, yarnOpts),
+ install(dependencies, {...yarnOpts, ...save}),
]).then(() => {
if (['plugin', 'multi'].includes(this.type)) {
this.spawnCommandSync(path.join('.', 'node_modules/.bin/oclif-dev'), ['readme'])

fix: always use --save with npm (#149)

this forces saving to package.json even if save=false is set in npmrc