Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.0.9 vite windows环境下打包报错 #17458

Open
hualuo0206 opened this issue Mar 17, 2025 · 0 comments
Open

4.0.9 vite windows环境下打包报错 #17458

hualuo0206 opened this issue Mar 17, 2025 · 0 comments

Comments

@hualuo0206
Copy link

相关平台

H5

浏览器版本: Chrome 132
使用框架: Vue 3

复现步骤

windows环境下 pnpm run build:h5

期望结果

正常打包

实际结果

打包报错

环境信息

Taro CLI 4.0.9 environment info:
    System:
      OS: macOS 15.3.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
      Yarn: 1.22.17 - /usr/local/bin/yarn
      npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
    npmPackages:
      @tarojs/cli: 4.0.9 => 4.0.9 
      @tarojs/components: 4.0.9 => 4.0.9 
      @tarojs/helper: 4.0.9 => 4.0.9 
      @tarojs/plugin-framework-vue3: 4.0.9 => 4.0.9 
      @tarojs/plugin-platform-alipay: 4.0.9 => 4.0.9 
      @tarojs/plugin-platform-h5: 4.0.9 => 4.0.9 
      @tarojs/plugin-platform-jd: 4.0.9 => 4.0.9 
      @tarojs/plugin-platform-qq: 4.0.9 => 4.0.9 
      @tarojs/plugin-platform-swan: 4.0.9 => 4.0.9 
      @tarojs/plugin-platform-tt: 4.0.9 => 4.0.9 
      @tarojs/plugin-platform-weapp: 4.0.9 => 4.0.9 
      @tarojs/runtime: 4.0.9 => 4.0.9 
      @tarojs/shared: 4.0.9 => 4.0.9 
      @tarojs/taro: 4.0.9 => 4.0.9 
      @tarojs/vite-runner: 4.0.9 => 4.0.9 
      babel-preset-taro: 4.0.9 => 4.0.9 
      eslint-config-taro: 4.0.9 => 4.0.

补充信息

4.0.9 vite版本vue3
node版本:18.16.1
pnpm版本:8.6.4

报错如下
[commonjs--resolver] The argument 'path' must be a string or Uint8Array without null bytes. Received 'D:\smartpark\gzh\\x00D:\smartpark\gzh\src\@tarojs\plugin-platform-h5\dist\runtime.h5'�[39m
node:internal/errors:490
ErrorCaptureStackTrace(err);
^
TypeError: The argument 'path' must be a string or Uint8Array without null bytes. Received 'D:\smartpark\gzh\\x00D:\smartpark\gzh\src\@tarojs\plugin-platform-h5\dist\runtime.h5'
at realpathSync (node:fs:2508:3)
at realpathSync (D:\smartpark\gzh\node_modules.pnpm\[email protected]\node_modules\resolve\lib\sync.js:41:16)
at maybeRealpathSync (D:\smartpark\gzh\node_modules.pnpm\[email protected]\node_modules\resolve\lib\sync.js:52:16)
at loadpkg (D:\smartpark\gzh\node_modules.pnpm\[email protected]\node_modules\resolve\lib\sync.js:145:33)
at loadAsFileSync (D:\smartpark\gzh\node_modules.pnpm\[email protected]\node_modules\resolve\lib\sync.js:116:19)
at Function.resolveSync [as sync] (D:\smartpark\gzh\node_modules.pnpm\[email protected]\node_modules\resolve\lib\sync.js:102:17)
at resolveFrom (file:///D:/smartpark/gzh/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-c167897e.js:11609:22)
at resolvePackageData (file:///D:/smartpark/gzh/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-c167897e.js:22157:19)
at tryNodeResolve (file:///D:/smartpark/gzh/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-c167897e.js:22942:21)
at Object.resolveId (file:///D:/smartpark/gzh/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-c167897e.js:22749:28)
at file:///D:/smartpark/gzh/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:25544:40
at PluginDriver.hookFirstAndGetPlugin (file:///D:/smartpark/gzh/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:25444:28)
at resolveId (file:///D:/smartpark/gzh/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:24117:26)
at ModuleLoader.resolveId (file:///D:/smartpark/gzh/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:24531:15) {
code: 'PLUGIN_ERROR',
pluginCode: 'ERR_INVALID_ARG_VALUE',
plugin: 'commonjs--resolver',
hook: 'resolveId',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant