Fails to bundle with eslint
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- eslint, typescript
- Domain
- build-system, tooling
Research direction
Reproduce the report from the TypeScript entry point shown in the issue, using npx ncc src/run.ts and then node dist/index.js. Inspect how the bundled dist/index.js resolves ESLint configuration and dependencies; done means the bundled CLI loads its config without the reported invalid-path error or unwanted dependency files in dist.
Written by the indexing model from the issue text.
Description
If eslint is a dependency this does not work. eslint cli fails to work saying it can not load config files and it creates a whole host of dependency files it loads into the dist folder
import { CLIEngine } from 'eslint';
async function run() {
const eslintConfig = {
extensions: ['.js', 'jsx', '.ts', '.tsx'],
ignorePath: '.gitignore',
ignore: true,
useEslintrc: true,
};
console.log('[ESLINT] Run With Configuration: ', eslintConfig);
const eslint = new CLIEngine(eslintConfig);
const results = await eslint.executeOnFiles(['./src/eslint.ts']);
console.log(results);
}
run();
npx ncc src/run.ts
node dist/index.js
(node:3673) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
- Dominant language
- JavaScript
- Stars
- 9.8k
- Forks
- 326
- PR merge metrics
- No merged PRs in 30d
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.
More from vercel/ncc
-
Difficulty 1/5 1-3 hours Newbie friendliness 62/100
-
Typescript 7 support Openhelp wanted
Difficulty 3/5 1-2 days Newbie friendliness 52/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
bug help wanted
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
ncc build generating multiple index.js files instead of a single bundle after upgrading Node.js Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100