We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69a87e3 commit c5043aeCopy full SHA for c5043ae
src/index.ts
@@ -214,7 +214,7 @@ export function printCommand(...commands: string[]) {
214
215
/** @see https://github.com/uetchy/create-create-app */
216
export async function create(appName: string, options: Options) {
217
- epicfail(require.main!.filename, {
+ epicfail(require?.main?.filename ?? process.cwd(), {
218
assertExpected: (err) => err.name === 'CLIError',
219
});
220
0 commit comments