Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena committed Feb 12, 2022
1 parent ebb0db4 commit d100813
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/create-docusaurus/bin/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import {program} from 'commander';
import {createRequire} from 'module';
import init from '../lib/index.js';

const requiredVersion = createRequire(import.meta.url)('../package.json')
.engines.node;
const packageJson = createRequire(import.meta.url)('../package.json');
const requiredVersion = packageJson.engines.node;

if (!semver.satisfies(process.version, requiredVersion)) {
logger.error('Minimum Node.js version not met :(');
Expand All @@ -32,7 +32,7 @@ function wrapCommand(fn) {
});
}

program.version(require('../package.json').version);
program.version(packageJson.version);

program
.arguments('[siteName] [template] [rootDir]')
Expand Down

0 comments on commit d100813

Please sign in to comment.