mirror of
https://github.com/strapi/strapi.git
synced 2025-12-12 07:27:46 +00:00
Merge pull request #11850 from yuku/fix-11848
Dealing with dependencies which don't export package.json
This commit is contained in:
commit
30db467072
@ -60,7 +60,12 @@ const getEnabledPlugins = async strapi => {
|
||||
const installedPlugins = {};
|
||||
for (const dep in strapi.config.get('info.dependencies', {})) {
|
||||
const packagePath = join(dep, 'package.json');
|
||||
const packageInfo = require(packagePath);
|
||||
let packageInfo;
|
||||
try {
|
||||
packageInfo = require(packagePath);
|
||||
} catch {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isStrapiPlugin(packageInfo)) {
|
||||
validatePluginName(packageInfo.strapi.name);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user