0

I'm encountering an error when trying to run pnpm run dev in my ReactPress project (version 1.6.0). The build process fails during the build:config step with a TypeScript error stating that files in src/*.ts cannot be found.

Error log:

> [email protected] dev C:\development\reactpress > pnpm build:config && concurrently 'pnpm:dev:*' > [email protected] build:config C:\development\reactpress > pnpm run --dir ./config build > @reactpress/[email protected] build C:\development\reactpress\config > tsc src/*.ts --outDir lib --skipLibCheck --declaration error TS6053: File 'src/*.ts' not found. 

Steps to reproduce:

  1. Clone ReactPress repository
  2. Run pnpm install
  3. Run pnpm run dev
New contributor
react is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

1 Answer 1

-1

The folder reactpress/config/src/ is empty

ReactPress tries to compile TypeScript config files with:

tsc src/*.ts

…but since there are no .ts files inside /config/src, the build script fails.

This is a known bug in ReactPress v1.6.0.

Fix 1 — Create an empty TypeScript file

This is the easiest fix and works immediately.

Inside:

reactpress/config/src/

Create a file named:

index.ts

It can be empty or contain:

export {};

Then run:

pnpm run dev

✔ Build passes

✔ ReactPress starts

✔ No impact on functionality

Fix 2 — Change the config build command to avoid wildcard

Open:

reactpress/config/package.json

Find this line:

"build": "tsc src/*.ts --outDir lib --skipLibCheck --declaration"

Replace it with:

"build": "tsc --project tsconfig.json"

Or simply:

"build": "tsc"

Then run:

pnpm run dev

✔ Works even if src/ is empty

✔ Correct TypeScript behavior

Fix 3 — Copy missing config files from a working version

If you want the intended default config, copy from ReactPress 1.5 or 1.4:

Create files:

reactpress/config/src/index.ts

reactpress/config/src/types.ts

Example content:

index.ts

export const defaultConfig = {};

types.ts

export type Config = Record<string, any>;

Then run again.

New contributor
Jean patrick R is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.