add to resolvePackageJson path
MODIFY
bin-src/lib/getStorybookMetadata.ts
bin-src/lib/getStorybookMetadata.ts
@@ -19,7 +19,7 @@ export const resolvePackageJson = (log, pkg: string) => {
// but this will obviously not be present during tests, hence the check and fallback to the normal require
// const r = typeof __non_webpack_require__ !== 'undefined' ? __non_webpack_require__ : require;
log.debug(pkg);
- const packagePath = path.resolve(`${pkg}/package.json`);
+ const packagePath = path.resolve(`node_modules/${pkg}/package.json`);
return fs.readJson(packagePath);
} catch (error) {
return Promise.reject(error);

add to resolvePackageJson path