[Bug]: since beta.47, failed to build on jenkins pipeline docker, error 'Cannot resolve entry module vite.config.ts.'
Reproduction link or steps
in jenkins, use docker node:22-slim (but i can't replay on my unbuntu use docker)
What is expected?
no
What is actually happening?
no
System Info
no
Any additional comments?
No response
i got the same error
Ah, I guess it's https://github.com/oxc-project/oxc-resolver/issues/824
rolldown-vite 7.2.0-beta.3 uses rolldown 1.0.0-beta.47 and that uses oxc-resolver 11.13.1, which matches the report of https://github.com/oxc-project/oxc-resolver/issues/824.
#6956
@sapphi-red problem unresolved on beta.50
Hello @liuzwZYW. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs-reproduction will be closed if they have no activity within 14 days. Thanks!
@sapphi-red sorry, but i can report log to help. maybe cause by: to resolve 'node:module' with oxc-resolver
I don't think we can find the reason unless we have a reproduction.
it's oxc-resolver 11.13.2 problem
- echo 'START: 使用 node:22-alpine 镜像运行构建...' START: 使用 node:22-alpine 镜像运行构建...
- pwd /data/jenkins/workspace/ithinkdt-portal-front
- ls ./vite.config.ts ./vite.proxy.ts ./vite.config.ts ./vite.proxy.ts
- OXC_LOG=DEBUG RD_LOG=debug node ./test.mjs directory /data/jenkins/workspace/ithinkdt-portal-front 2025-11-14T09:38:10.433944Z DEBUG resolve{path="/data/jenkins/workspace/ithinkdt-portal-front" specifier="/data/jenkins/workspace/ithinkdt-portal-front/vite.config.ts"}: oxc_resolver: options=ResolveOptions { cwd: None, tsconfig: None, alias: [], alias_fields: [], condition_names: [], enforce_extension: Disabled, exports_fields: [["exports"]], imports_fields: [["imports"]], extension_alias: [], extensions: [".js", ".json", ".node"], fallback: [], fully_specified: false, main_fields: ["main"], main_files: ["index"], modules: ["node_modules"], resolve_to_context: false, prefer_relative: false, prefer_absolute: false, restrictions: [], roots: [], symlinks: true, builtin_modules: false, module_type: false, allow_package_exports_in_directory_resolve: false, yarn_pnp: false } path="/data/jenkins/workspace/ithinkdt-portal-front" specifier="/data/jenkins/workspace/ithinkdt-portal-front/vite.config.ts" err=NotFound("/data/jenkins/workspace/ithinkdt-portal-front/vite.config.ts") specifier /data/jenkins/workspace/ithinkdt-portal-front/vite.config.ts resolution { error: "Cannot find module '/data/jenkins/workspace/ithinkdt-portal-front/vite.config.ts'" } 2025-11-14T09:38:10.435997Z DEBUG resolve{path="/data/jenkins/workspace/ithinkdt-portal-front" specifier="vite.config.ts"}: oxc_resolver: options=ResolveOptions { cwd: None, tsconfig: None, alias: [], alias_fields: [], condition_names: [], enforce_extension: Disabled, exports_fields: [["exports"]], imports_fields: [["imports"]], extension_alias: [], extensions: [".js", ".json", ".node"], fallback: [], fully_specified: false, main_fields: ["main"], main_files: ["index"], modules: ["node_modules"], resolve_to_context: false, prefer_relative: false, prefer_absolute: false, restrictions: [], roots: [], symlinks: true, builtin_modules: false, module_type: false, allow_package_exports_in_directory_resolve: false, yarn_pnp: false } path="/data/jenkins/workspace/ithinkdt-portal-front" specifier="vite.config.ts" err=NotFound("vite.config.ts") specifier vite.config.ts resolution { error: "Cannot find module 'vite.config.ts'" } 2025-11-14T09:38:10.436579Z DEBUG resolve{path="/data/jenkins/workspace/ithinkdt-portal-front" specifier="./vite.config.ts"}: oxc_resolver: options=ResolveOptions { cwd: None, tsconfig: None, alias: [], alias_fields: [], condition_names: [], enforce_extension: Disabled, exports_fields: [["exports"]], imports_fields: [["imports"]], extension_alias: [], extensions: [".js", ".json", ".node"], fallback: [], fully_specified: false, main_fields: ["main"], main_files: ["index"], modules: ["node_modules"], resolve_to_context: false, prefer_relative: false, prefer_absolute: false, restrictions: [], roots: [], symlinks: true, builtin_modules: false, module_type: false, allow_package_exports_in_directory_resolve: false, yarn_pnp: false } path="/data/jenkins/workspace/ithinkdt-portal-front" specifier="./vite.config.ts" err=NotFound("./vite.config.ts") specifier ./vite.config.ts resolution { error: "Cannot find module './vite.config.ts'" }
- echo 'DONE: 构建完成' DONE: 构建完成
this demo fails in Centos,but works in Windows 10
in my centos,error log like
[root@devtool vite-project]# pnpm build
> [email protected] build /tmp/vite-project
> vite build
failed to load config from /tmp/vite-project/vite.config.js
error during build:
Error: Build failed with 1 error:
[UNRESOLVED_ENTRY] Error: Cannot resolve entry module vite.config.js.
at aggregateBindingErrorsIntoJsError (file:///tmp/vite-project/node_modules/.pnpm/[email protected]/node_modules/rolldown/dist/shared/src-CYkh2Ybc.mjs:2659:18)
at unwrapBindingResult (file:///tmp/vite-project/node_modules/.pnpm/[email protected]/node_modules/rolldown/dist/shared/src-CYkh2Ybc.mjs:2634:128)
at #build (file:///tmp/vite-project/node_modules/.pnpm/[email protected]/node_modules/rolldown/dist/shared/src-CYkh2Ybc.mjs:4433:34)
at async bundleConfigFile (file:///tmp/vite-project/node_modules/.pnpm/[email protected]/node_modules/rolldown-vite/dist/node/chunks/node.js:36093:17)
at async bundleAndLoadConfigFile (file:///tmp/vite-project/node_modules/.pnpm/[email protected]/node_modules/rolldown-vite/dist/node/chunks/node.js:36009:18)
at async loadConfigFromFile (file:///tmp/vite-project/node_modules/.pnpm/[email protected]/node_modules/rolldown-vite/dist/node/chunks/node.js:35978:42)
at async resolveConfig (file:///tmp/vite-project/node_modules/.pnpm/[email protected]/node_modules/rolldown-vite/dist/node/chunks/node.js:35597:22)
at async createBuilder (file:///tmp/vite-project/node_modules/.pnpm/[email protected]/node_modules/rolldown-vite/dist/node/chunks/node.js:33846:19)
at async CAC.<anonymous> (file:///tmp/vite-project/node_modules/.pnpm/[email protected]/node_modules/rolldown-vite/dist/node/cli.js:629:10)
package.json
{
"name": "vite-project",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.5.24"
},
"devDependencies": {
"@vitejs/plugin-vue": "^6.0.1",
"vite": "npm:[email protected]"
}
}
vite.config.js
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [vue()],
})
main.js
import { createApp } from 'vue'
import App from './App.vue'
createApp(App).mount('#app')
index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>vite-project</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
@Boshen hello! I can confirm this issue with beta.51 as well. Our builds are failing in a Jenkins/CentOS environment with the same error Cannot resolve entry module vite.config.ts, while local development on macOS works without any problems.
This is currently blocking our CI/CD pipeline. Does anyone have a temporary workaround or configuration change that can help bypass this error for the time being? Any suggestions would be greatly appreciated!
Thanks!
maybe: centos 7 default kernel is 3.10, statx need 3.18
Could you try 1.0.0-beta.53?
https://github.com/oxc-project/oxc-resolver/pull/901
@shulaoda still get the same error with 1.0.0-beta.53, it works fine on Windows
[UNRESOLVED_ENTRY] Error: Cannot resolve entry module vite.config.js.
at aggregateBindingErrorsIntoJsError (file:///tmp/vite-project/node_modules/.pnpm/[email protected]/node_modules/rolldown/dist/shared/bindingify-input-options-Bk0BBr2s.mjs:56:18)
at unwrapBindingResult (file:///tmp/vite-project/node_modules/.pnpm/[email protected]/node_modules/rolldown/dist/shared/bindingify-input-options-Bk0BBr2s.mjs:31:128)
at #build (file:///tmp/vite-project/node_modules/.pnpm/[email protected]/node_modules/rolldown/dist/shared/rolldown-build-BEU8N80I.mjs:2260:34)
at async bundleConfigFile (file:///tmp/vite-project/node_modules/.pnpm/[email protected]/node_modules/rolldown-vite/dist/node/chunks/node.js:35430:17)
at async bundleAndLoadConfigFile (file:///tmp/vite-project/node_modules/.pnpm/[email protected]/node_modules/rolldown-vite/dist/node/chunks/node.js:35340:18)
at async loadConfigFromFile (file:///tmp/vite-project/node_modules/.pnpm/[email protected]/node_modules/rolldown-vite/dist/node/chunks/node.js:35309:42)
at async resolveConfig (file:///tmp/vite-project/node_modules/.pnpm/[email protected]/node_modules/rolldown-vite/dist/node/chunks/node.js:34928:22)
at async createBuilder (file:///tmp/vite-project/node_modules/.pnpm/[email protected]/node_modules/rolldown-vite/dist/node/chunks/node.js:33177:19)
at async CAC.<anonymous> (file:///tmp/vite-project/node_modules/.pnpm/[email protected]/node_modules/rolldown-vite/dist/node/cli.js:629:10)
kernel version:
root# uname -r
3.10.0-862.el7.x86_64
root# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
@snecker Please wait for the next release, this issue has been fixed in oxc-resolver.
由于 rolldown-vite 目前最新版本 7.3.0,其中 rolldown 依赖固定版本为 1.0.0-beta.53 , 若需紧急修复此类问题,可以通过 pnpm overrides
Since the latest version of rolldown-vite is currently 7.3.0, and its rolldown dependency is fixed at version 1.0.0-beta.53, you can urgently fix this issue using pnpm overrides.
example-> package.json pnpm "pnpm": { "overrides": { "rolldown": "1.0.0-beta.56" } }
yarn "resolutions": { "rolldown": "1.0.0-beta.56" }
npm "overrides": { "rolldown": "1.0.0-beta.56" }