feat: Always install from path if the resolved URL does not include npmjs.

This commit is contained in:
SamTV12345 2024-04-01 17:12:30 +02:00
parent ccd4f52150
commit 9a19979ecb

View file

@ -64,12 +64,12 @@ const migratePluginsFromNodeModules = async () => {
.filter(([pkg, info]) => pkg.startsWith(plugins.prefix) && pkg !== 'ep_etherpad-lite') .filter(([pkg, info]) => pkg.startsWith(plugins.prefix) && pkg !== 'ep_etherpad-lite')
.map(async ([pkg, info]) => { .map(async ([pkg, info]) => {
const _info = info as PackageInfo const _info = info as PackageInfo
if (!_info.resolved) { if (!_info.resolved|| !_info.resolved.includes('npm')) {
// Install from node_modules directory // Install from node_modules directory
await linkInstaller.installFromPath(`${findEtherpadRoot()}/node_modules/${pkg}`); await linkInstaller.installFromPath(`${findEtherpadRoot()}/node_modules/${pkg}`);
} else { } else {
await linkInstaller.installPlugin(pkg); await linkInstaller.installPlugin(pkg, _info.version);
} }
})); }));
await persistInstalledPlugins(); await persistInstalledPlugins();
}; };