更新之后尝试重新编译在过程中发现产生错误,更改环境后重新尝试问题依旧,似乎是新添加的文件_vite.config.mjs出现问题,报错如下
[root@localhost mirror-web]# bundle exec jekyll build
Configuration file: /root/mirror-web/_config.yml
Source: /root/mirror-web
Destination: /root/mirror-web/_site
Incremental build: disabled. Enable with --incremental
Generating...
Building with Vite ⚡️
failed to load config from /root/mirror-web/_vite.config.mjs
error during build:
TypeError: (intermediate value).resolve is not a function
at file:///root/mirror-web/_vite.config.mjs.timestamp-1715068357404-37b54626ab73f.mjs:68:46
at Array.map ()
at Object.readConfigFile (file:///root/mirror-web/_vite.config.mjs.timestamp-1715068357404-37b54626ab73f.mjs:61:51)
at readTsConfigFile (file:///root/mirror-web/node_modules/@rollup/plugin-typescript/dist/es/index.js:259:34)
at parseTypescriptConfig (file:///root/mirror-web/node_modules/@rollup/plugin-typescript/dist/es/index.js:319:41)
at typescript (file:///root/mirror-web/node_modules/@rollup/plugin-typescript/dist/es/index.js:754:27)
at file:///root/mirror-web/_vite.config.mjs.timestamp-1715068357404-37b54626ab73f.mjs:130:5
at loadConfigFromFile (file:///root/mirror-web/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:68531:15)
at async resolveConfig (file:///root/mirror-web/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:68138:28)
at async build (file:///root/mirror-web/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:67273:20)
pid 527570 exit 1
Build with Vite failed! ❌
Jekyll 4.3.3 Please append `--trace` to the `build` command
for any additional information or backtrace.
------------------------------------------------
/root/mirror-web/_plugins/jekyll-vite.rb:93:in generate_vite_build': Vite build failed (RuntimeError) from /root/mirror-web/_plugins/jekyll-vite.rb:76:ingenerate'
from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/site.rb:193:in block in generate' from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/site.rb:191:ineach'
from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/site.rb:191:in generate' from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/site.rb:79:inprocess'
from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/command.rb:28:in process_site' from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/commands/build.rb:65:inbuild'
from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/commands/build.rb:36:in process' from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/command.rb:91:inblock in process_with_graceful_fail'
from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/command.rb:91:in each' from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/command.rb:91:inprocess_with_graceful_fail'
from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/commands/build.rb:18:in block (2 levels) in init_with_program' from /usr/local/share/gems/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:inblock in execute'
from /usr/local/share/gems/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in each' from /usr/local/share/gems/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:inexecute'
from /usr/local/share/gems/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in go' from /usr/local/share/gems/gems/mercenary-0.4.0/lib/mercenary.rb:21:inprogram'
from /usr/share/gems/gems/jekyll-4.3.3/exe/jekyll:15:in <top (required)>' from /usr/local/bin/jekyll:25:inload'
from /usr/local/bin/jekyll:25:in <top (required)>' from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/cli/exec.rb:58:inload'
from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/cli/exec.rb:58:in kernel_load' from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/cli/exec.rb:23:inrun'
from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/cli.rb:492:in exec' from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/command.rb:27:inrun'
from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor.rb:392:indispatch'
from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/cli.rb:34:in dispatch' from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/base.rb:485:instart'
from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/cli.rb:28:in start' from /usr/local/share/gems/gems/bundler-2.4.21/exe/bundle:37:inblock in <top (required)>'
from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/friendly_errors.rb:117:in with_friendly_errors' from /usr/local/share/gems/gems/bundler-2.4.21/exe/bundle:29:in<top (required)>'
from /usr/local/bin/bundle:23:in load' from /usr/local/bin/bundle:23:in'
更新之后尝试重新编译在过程中发现产生错误,更改环境后重新尝试问题依旧,似乎是新添加的文件_vite.config.mjs出现问题,报错如下 [root@localhost mirror-web]# bundle exec jekyll build Configuration file: /root/mirror-web/_config.yml Source: /root/mirror-web Destination: /root/mirror-web/_site Incremental build: disabled. Enable with --incremental Generating... Building with Vite ⚡️ failed to load config from /root/mirror-web/_vite.config.mjs error during build: TypeError: (intermediate value).resolve is not a function at file:///root/mirror-web/_vite.config.mjs.timestamp-1715068357404-37b54626ab73f.mjs:68:46 at Array.map ()
at Object.readConfigFile (file:///root/mirror-web/_vite.config.mjs.timestamp-1715068357404-37b54626ab73f.mjs:61:51)
at readTsConfigFile (file:///root/mirror-web/node_modules/@rollup/plugin-typescript/dist/es/index.js:259:34)
at parseTypescriptConfig (file:///root/mirror-web/node_modules/@rollup/plugin-typescript/dist/es/index.js:319:41)
at typescript (file:///root/mirror-web/node_modules/@rollup/plugin-typescript/dist/es/index.js:754:27)
at file:///root/mirror-web/_vite.config.mjs.timestamp-1715068357404-37b54626ab73f.mjs:130:5
at loadConfigFromFile (file:///root/mirror-web/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:68531:15)
at async resolveConfig (file:///root/mirror-web/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:68138:28)
at async build (file:///root/mirror-web/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:67273:20)
pid 527570 exit 1 Build with Vite failed! ❌
/root/mirror-web/_plugins/jekyll-vite.rb:93:in'
generate_vite_build': Vite build failed (RuntimeError) from /root/mirror-web/_plugins/jekyll-vite.rb:76:in
generate' from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/site.rb:193:inblock in generate' from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/site.rb:191:in
each' from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/site.rb:191:ingenerate' from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/site.rb:79:in
process' from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/command.rb:28:inprocess_site' from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/commands/build.rb:65:in
build' from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/commands/build.rb:36:inprocess' from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/command.rb:91:in
block in process_with_graceful_fail' from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/command.rb:91:ineach' from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/command.rb:91:in
process_with_graceful_fail' from /usr/share/gems/gems/jekyll-4.3.3/lib/jekyll/commands/build.rb:18:inblock (2 levels) in init_with_program' from /usr/local/share/gems/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in
block in execute' from /usr/local/share/gems/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:ineach' from /usr/local/share/gems/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in
execute' from /usr/local/share/gems/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:ingo' from /usr/local/share/gems/gems/mercenary-0.4.0/lib/mercenary.rb:21:in
program' from /usr/share/gems/gems/jekyll-4.3.3/exe/jekyll:15:in<top (required)>' from /usr/local/bin/jekyll:25:in
load' from /usr/local/bin/jekyll:25:in<top (required)>' from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/cli/exec.rb:58:in
load' from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/cli/exec.rb:58:inkernel_load' from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/cli/exec.rb:23:in
run' from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/cli.rb:492:inexec' from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/command.rb:27:in
run' from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:ininvoke_command' from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor.rb:392:in
dispatch' from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/cli.rb:34:indispatch' from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/base.rb:485:in
start' from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/cli.rb:28:instart' from /usr/local/share/gems/gems/bundler-2.4.21/exe/bundle:37:in
block in <top (required)>' from /usr/local/share/gems/gems/bundler-2.4.21/lib/bundler/friendly_errors.rb:117:inwith_friendly_errors' from /usr/local/share/gems/gems/bundler-2.4.21/exe/bundle:29:in
<top (required)>' from /usr/local/bin/bundle:23:inload' from /usr/local/bin/bundle:23:in