TS18002: The 'files' list in config file 'tsconfig.json' is empty.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 9.8k
- Forks
- 326
- PR merge metrics
- No merged PRs in 30d
Description
Running yarn && yarn build works fine on macOS with node v14.15.0. Yet when I run the build inside the node:14-buster docker image, it fails.
Here's my repo. Running yarn && yarn build will work, but running docker build . fails with the error below.
Any suggestions on how I can debug this? Is there something different between macOS and debian in how ncc works? I'm at a loss as to how to investigate...
ncc: Version 0.25.1
ncc: Compiling file index.js
ncc: Using typescript@3.9.7 (local user-provided)
Error: Module build failed (from ./node_modules/@vercel/ncc/dist/ncc/loaders/ts-loader.js):
Error: error while parsing tsconfig.json
at Object.loader (/usr/src/node_modules/@vercel/ncc/dist/ncc/loaders/ts-loader.js.cache.js:1:352078)
[tsl] ERROR
TS18002: The 'files' list in config file 'tsconfig.json' is empty.
at /usr/src/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:3258160
at /usr/src/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:2210952
at eval (eval at create (/usr/src/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:1140142), <anonymous>:13:1)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The command '/bin/sh -c yarn build' returned a non-zero code: 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the difference by running yarn && yarn build and docker build . with the reported Node 14 environment. Inspect tsconfig.json and the build entry point index.js, then compare the TypeScript configuration and ncc behavior between macOS and node:14-buster. Done means the Docker build completes without TS18002.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, javascript, nodejs, typescript
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100