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