Skip to content

Commit

Permalink
Merge pull request #28752 from abcdmku/issue-28606-fix
Browse files Browse the repository at this point in the history
Fix: Invariant failed: Expected package.json#version to be defined in the "undefined" package
  • Loading branch information
ndelangen authored Aug 2, 2024
2 parents 1165845 + a65743e commit be429a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/core/src/core-server/standalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { dirname } from 'node:path';

async function build(options: any = {}, frameworkOptions: any = {}) {
const { mode = 'dev' } = options;
const packageJson = dirname(require.resolve('@storybook/core/package.json'));
const packageJsonDir = dirname(require.resolve('@storybook/core/package.json'));
const packageJson = JSON.parse(require('fs').readFileSync(`${packageJsonDir}/package.json`));

const commonOptions = {
...options,
Expand Down

0 comments on commit be429a7

Please sign in to comment.