NervJS / taro

开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/
https://docs.taro.zone/
Other
35.34k stars 4.77k forks source link

Taro3.5.7 vue3版本引入vantweapp报错 #12839

Closed nico-summer closed 1 year ago

nico-summer commented 1 year ago

相关平台

微信小程序

复现仓库

https://github.com/nico-summer/taro-vue3-improt-vant-issue.git 小程序基础库: 2.27.2 使用框架: Vue 3

复现步骤

根据Tarocli创建一个vue3的版本 然后根据文档操作引入vantweapp

期望结果

引入成功可以正常使用

实际结果

InvalidDependenciesModuleWarning: Invalid dependencies have been reported by plugins or loaders for this module. All reported dependencies need to be absolute paths. Invalid dependencies may lead to broken watching and caching. As best effort we try to convert all invalid values to absolute paths and converting globs into context dependencies, but this is deprecated behavior. Loaders: Pass absolute paths to this.addDependency (existing files), this.addMissingDependency (not existing files), and this.addContextDependency (directories). Plugins: Pass absolute paths to fileDependencies (existing files), missingDependencies (not existing files), and contextDependencies (directories). Globs: They are not supported. Pass absolute path to the directory as context dependencies. The following invalid values have been reported:

InvalidDependenciesModuleWarning: Invalid dependencies have been reported by plugins or loaders for this module. All reported dependencies need to be absolute paths. Invalid dependencies may lead to broken watching and caching. As best effort we try to convert all invalid values to absolute paths and converting globs into context dependencies, but this is deprecated behavior. Loaders: Pass absolute paths to this.addDependency (existing files), this.addMissingDependency (not existing files), and this.addContextDependency (directories). Plugins: Pass absolute paths to fileDependencies (existing files), missingDependencies (not existing files), and contextDependencies (directories). Globs: They are not supported. Pass absolute path to the directory as context dependencies. The following invalid values have been reported:

InvalidDependenciesModuleWarning: Invalid dependencies have been reported by plugins or loaders for this module. All reported dependencies need to be absolute paths. Invalid dependencies may lead to broken watching and caching. As best effort we try to convert all invalid values to absolute paths and converting globs into context dependencies, but this is deprecated behavior. Loaders: Pass absolute paths to this.addDependency (existing files), this.addMissingDependency (not existing files), and this.addContextDependency (directories). Plugins: Pass absolute paths to fileDependencies (existing files), missingDependencies (not existing files), and contextDependencies (directories). Globs: They are not supported. Pass absolute path to the directory as context dependencies. The following invalid values have been reported:

环境信息

  Taro CLI 3.5.7 environment info:
    System:
      OS: macOS 12.2.1
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 18.0.0 - /usr/local/bin/node
      npm: 8.6.0 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: 3.5.7 => 3.5.7 
      @tarojs/components: 3.5.7 => 3.5.7 
      @tarojs/helper: 3.5.7 => 3.5.7 
      @tarojs/plugin-framework-vue3: 3.5.7 => 3.5.7 
      @tarojs/plugin-html: 3.5.7 => 3.5.7 
      @tarojs/plugin-platform-alipay: 3.5.7 => 3.5.7 
      @tarojs/plugin-platform-jd: 3.5.7 => 3.5.7 
      @tarojs/plugin-platform-qq: 3.5.7 => 3.5.7 
      @tarojs/plugin-platform-swan: 3.5.7 => 3.5.7 
      @tarojs/plugin-platform-tt: 3.5.7 => 3.5.7 
      @tarojs/plugin-platform-weapp: 3.5.7 => 3.5.7 
      @tarojs/router: 3.5.7 => 3.5.7 
      @tarojs/runtime: 3.5.7 => 3.5.7 
      @tarojs/shared: 3.5.7 => 3.5.7 
      @tarojs/taro: 3.5.7 => 3.5.7 
      @tarojs/taro-h5: 3.5.7 => 3.5.7 
      @tarojs/webpack5-runner: 3.5.7 => 3.5.7 
      babel-preset-taro: 3.5.7 => 3.5.7 
      eslint-config-taro: 3.5.7 => 3.5.7 
xiang12383 commented 1 year ago

这个问题解决的了吗?一样的报错

` InvalidDependenciesModuleWarning: Invalid dependencies have been reported by plugins or loaders for this module. All reported dependencies need to be absolute paths. Invalid dependencies may lead to broken watching and caching. As best effort we try to convert all invalid values to absolute paths and converting globs into context dependencies, but this is deprecated behavior. Loaders: Pass absolute paths to this.addDependency (existing files), this.addMissingDependency (not existing files), and this.addContextDepenLoaders: Pass absolute paths to this.addDependency (existing files), this.addMissingDependency (not existing files), and this.addContextDependency (directories). Plugins: Pass absolute paths to fileDependencies (existing files), missingDependencies (not existing files), and contextDependencies (directories). Globs: They are not supported. Pass absolute path to the directory as context dependencies. The following invalid values have been reported:

nico-summer commented 1 year ago

这个问题解决的了吗?一样的报错

` InvalidDependenciesModuleWarning: Invalid dependencies have been reported by plugins or loaders for this module. All reported dependencies need to be absolute paths. Invalid dependencies may lead to broken watching and caching. As best effort we try to convert all invalid values to absolute paths and converting globs into context dependencies, but this is deprecated behavior. Loaders: Pass absolute paths to this.addDependency (existing files), this.addMissingDependency (not existing files), and this.addContextDepenLoaders: Pass absolute paths to this.addDependency (existing files), this.addMissingDependency (not existing files), and this.addContextDependency (directories). Plugins: Pass absolute paths to fileDependencies (existing files), missingDependencies (not existing files), and contextDependencies (directories). Globs: They are not supported. Pass absolute path to the directory as context dependencies. The following invalid values have been reported:

  • "../wxs/utils.wxs" at Generator.next () `

没解决 只能自己实现了 无奈nutui也挺内啥的

Chen-jj commented 1 year ago

@nico-summer 感谢反馈~