{"id":20608128,"url":"https://github.com/tirithen/vitest-import-error","last_synced_at":"2026-04-18T22:04:16.919Z","repository":{"id":233261501,"uuid":"781983597","full_name":"tirithen/vitest-import-error","owner":"tirithen","description":"A minimal reproduction of the vitest CJS/ESM import errors","archived":false,"fork":false,"pushed_at":"2024-04-04T12:24:47.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T17:36:01.275Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tirithen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-04T12:17:10.000Z","updated_at":"2024-04-04T12:25:14.000Z","dependencies_parsed_at":"2024-04-15T09:20:45.171Z","dependency_job_id":"c5993522-5ee5-4a42-bab7-7e82acdb36ed","html_url":"https://github.com/tirithen/vitest-import-error","commit_stats":null,"previous_names":["tirithen/vitest-import-error"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tirithen/vitest-import-error","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tirithen%2Fvitest-import-error","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tirithen%2Fvitest-import-error/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tirithen%2Fvitest-import-error/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tirithen%2Fvitest-import-error/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tirithen","download_url":"https://codeload.github.com/tirithen/vitest-import-error/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tirithen%2Fvitest-import-error/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31986327,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"ssl_error","status_checked_at":"2026-04-18T20:23:29.375Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T10:09:33.564Z","updated_at":"2026-04-18T22:04:16.885Z","avatar_url":"https://github.com/tirithen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a minimal repo to reproduce the import errors that vitest has when\nprovided a minimal valid vite.config.js.\n\nThe problem seem to be related to the vitest package not using the exact same\ndefault configuration as vite does, this causes confusion among users and has\ngenerated multiple issues reported around the same problem.\n\nIn many cases it is possible to add vitest add additional custom configuration\nto enable vitest to run the files, but that shows that currently vitest lacks \nsane defaults matching the sane defaults of vite.\n\nSteps to reproduce:\n\n1. Clone this repo\n2. $ cd vitest-import-server\n3. $ npm install\n4. $ npx vite build\n5. $ npx vitest\n\nStep 4 builds as expected (produces output in `dist/`), step 5 crashes with the following error:\n\n```\nnpx vitest    \nThe CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.\n\n DEV  v1.4.0 /home/user/Projects/vitest-import-error\n\n ❯ index.test.js (0)\n\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\n\n FAIL  index.test.js [ index.test.js ]\nError: Failed to resolve entry for package \"@jdlien/validator\". The package may have incorrect main/module/exports specified in its package.json.\n ❯ packageEntryFailure node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:48302:17\n ❯ resolvePackageEntry node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:48299:5\n ❯ tryNodeResolve node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:48069:20\n ❯ Context.resolveId node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:47819:28\n ❯ Object.resolveId node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:51096:64\n ❯ TransformContext.resolve node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:50787:23\n ❯ normalizeUrl node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:66083:34\n ❯ async file:/home/user/Projects/vitest-import-error/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:66247:47\n ❯ TransformContext.transform node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:66168:13\n\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯\n\n Test Files  1 failed (1)\n      Tests  no tests\n   Start at  14:15:33\n   Duration  296ms (transform 20ms, setup 0ms, collect 0ms, tests 0ms, environment 0ms, prepare 66ms)\n\n\n FAIL  Tests failed. Watching for file changes...\n       press h to show help, press q to quit\nCancelling test run. Press CTRL+c again to exit forcefully.\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftirithen%2Fvitest-import-error","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftirithen%2Fvitest-import-error","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftirithen%2Fvitest-import-error/lists"}