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

3.6.6 开启cache后,cache功能报错 #13798

Closed
rexerwang opened this issue May 8, 2023 · 1 comment · Fixed by #13952
Closed

3.6.6 开启cache后,cache功能报错 #13798

rexerwang opened this issue May 8, 2023 · 1 comment · Fixed by #13952

Comments

@rexerwang
Copy link

相关平台

微信小程序

小程序基础库: 2.31.0
使用框架: React

复现步骤

配置开启Cache后 cache.enable = true,报如下异常:

<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Can't resolve '@tarojs/taro-loader/lib/page' in '<repo_path>'
<w> while resolving '@tarojs/taro-loader/lib/page' in <repo_path> as file
<w>  at resolve commonjs @tarojs/taro-loader/lib/page

期望结果

无此异常

实际结果

RT

环境信息

Taro CLI 3.6.6 environment info:
  System:
    OS: macOS 13.3.1
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
    Yarn: 3.5.0 - ~/.nvm/versions/node/v18.15.0/bin/yarn
    npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
  npmPackages:
    @tarojs/cli: 3.6.6 => 3.6.6 
    @tarojs/components: 3.6.6 => 3.6.6 
    @tarojs/helper: 3.6.6 => 3.6.6 
    @tarojs/plugin-framework-react: 3.6.6 => 3.6.6 
    @tarojs/plugin-platform-h5: 3.6.6 => 3.6.6 
    @tarojs/plugin-platform-weapp: 3.6.6 => 3.6.6 
    @tarojs/react: 3.6.6 => 3.6.6 
    @tarojs/runtime: 3.6.6 => 3.6.6 
    @tarojs/shared: 3.6.6 => 3.6.6 
    @tarojs/taro: 3.6.6 => 3.6.6 
    @tarojs/webpack5-runner: 3.6.6 => 3.6.6 
    babel-preset-taro: 3.6.6 => 3.6.6 
    eslint-config-taro: 3.6.6 => 3.6.6 
    react: ^18.2.0 => 18.2.0 
@rexerwang
Copy link
Author

原因是: 幽灵依赖

pnpm why @tarojs/taro-loader

解决:安装该依赖

pnpm add -D @tarojs/taro-loader@3.6.6

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

Successfully merging a pull request may close this issue.

1 participant