forked from farhoodlabs/paperclip
Fix adapter install pruning other plugins by removing --no-save
npm install --no-save does not record dependencies in package.json, so when a second adapter is installed, npm prunes the first as extraneous. Removing --no-save ensures all installed adapters are tracked in the managed package.json and persist across installs. Fixes FAR-47 Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -256,7 +256,7 @@ export function adapterRoutes() {
|
|||||||
|
|
||||||
logger.info({ spec, pluginsDir }, "Installing adapter package via npm");
|
logger.info({ spec, pluginsDir }, "Installing adapter package via npm");
|
||||||
|
|
||||||
await execFileAsync("npm", ["install", "--no-save", spec], {
|
await execFileAsync("npm", ["install", spec], {
|
||||||
cwd: pluginsDir,
|
cwd: pluginsDir,
|
||||||
timeout: 120_000,
|
timeout: 120_000,
|
||||||
});
|
});
|
||||||
@@ -574,7 +574,7 @@ export function adapterRoutes() {
|
|||||||
|
|
||||||
logger.info({ type, packageName: record.packageName }, "Reinstalling adapter package via npm");
|
logger.info({ type, packageName: record.packageName }, "Reinstalling adapter package via npm");
|
||||||
|
|
||||||
await execFileAsync("npm", ["install", "--no-save", record.packageName.trim()], {
|
await execFileAsync("npm", ["install", record.packageName.trim()], {
|
||||||
cwd: pluginsDir,
|
cwd: pluginsDir,
|
||||||
timeout: 120_000,
|
timeout: 120_000,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user