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

h5 mobx 报错: Uncaught TypeError: Cannot read property 'context' of null #7399

Closed
cx222333 opened this issue Aug 21, 2020 · 2 comments
Closed
Labels
T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@cx222333
Copy link

相关平台

H5

浏览器版本: Chrome 版本 84.0.4147.125(正式版本) (64 位)
使用框架: Nerv

复现步骤

使用taro init myApp创建项目 使用nerv mobx sass后 taro build --type h5 --watch 直接报错:
Uncaught TypeError: Cannot read property 'context' of null
at Object.useContext (index.js?1e21:1716)
at Component.Provider (mobxreact.esm.js?4f20:466)
at Component.c.render (index.esm.js?68fe:1812)
at eval (index.esm.js?68fe:1861)
at errorCatcher (index.esm.js?68fe:1749)
at renderComponent (index.esm.js?68fe:1860)
at mountComponent (index.esm.js?68fe:1833)
at ComponentWrapper.init (index.esm.js?68fe:2256)
at createElement (index.esm.js?68fe:1480)
at mountVNode (index.esm.js?68fe:1795)

期望结果

能正常使用h5 mobx

实际结果

Uncaught TypeError: Cannot read property 'context' of null
at Object.useContext (index.js?1e21:1716)
at Component.Provider (mobxreact.esm.js?4f20:466)
at Component.c.render (index.esm.js?68fe:1812)
at eval (index.esm.js?68fe:1861)
at errorCatcher (index.esm.js?68fe:1749)
at renderComponent (index.esm.js?68fe:1860)
at mountComponent (index.esm.js?68fe:1833)
at ComponentWrapper.init (index.esm.js?68fe:2256)
at createElement (index.esm.js?68fe:1480)
at mountVNode (index.esm.js?68fe:1795)

环境信息

Taro v3.0.0-rc.6


  Taro CLI 3.0.0-rc.6 environment info:
    System:
      OS: macOS 10.15.4
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 12.16.2 - /usr/local/bin/node
      Yarn: 1.22.4 - /usr/local/bin/yarn
      npm: 6.14.4 - /usr/local/bin/npm
    npmPackages:
      @tarojs/components: 3.0.0-rc.6 => 3.0.0-rc.6 
      @tarojs/mini-runner: 3.0.0-rc.6 => 3.0.0-rc.6 
      @tarojs/runtime: 3.0.0-rc.6 => 3.0.0-rc.6 
      @tarojs/taro: 3.0.0-rc.6 => 3.0.0-rc.6 
      @tarojs/webpack-runner: 3.0.0-rc.6 => 3.0.0-rc.6 
      babel-preset-taro: 3.0.0-rc.6 => 3.0.0-rc.6 
      eslint-config-taro: 3.0.0-rc.6 => 3.0.0-rc.6 
      nervjs: ^1.5.0 => 1.5.7 
@taro-bot2 taro-bot2 bot added F-nerv T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Aug 21, 2020
@Chen-jj Chen-jj added this to the 3.0.10 milestone Sep 3, 2020
@Chen-jj Chen-jj modified the milestones: 3.0.10, 3.0.11 Sep 10, 2020
@ZakaryCode ZakaryCode modified the milestones: 3.0.11, 3.0.12 Sep 18, 2020
@zlyyyy
Copy link

zlyyyy commented Sep 27, 2020

兄弟你解决了吗

@Chen-jj Chen-jj modified the milestones: 3.0.15, 3.0.16 Oct 23, 2020
@Chen-jj Chen-jj modified the milestones: 3.0.16, 3.0.17 Nov 5, 2020
@Chen-jj Chen-jj modified the milestones: 3.0.17, 3.0.18 Nov 17, 2020
@Chen-jj Chen-jj modified the milestones: 3.0.18, 3.0.19 Dec 4, 2020
@Chen-jj Chen-jj modified the milestones: 3.0.19, 3.0.20, 3.0.22 Dec 19, 2020
@Chen-jj Chen-jj modified the milestones: 3.0.22, 3.1.0 Jan 4, 2021
@Chen-jj Chen-jj removed this from the 3.1.0 milestone Feb 19, 2021
@Chen-jj
Copy link
Contributor

Chen-jj commented Feb 19, 2021

最新版本已修复。

@Chen-jj Chen-jj closed this as completed Feb 19, 2021
@ZakaryCode ZakaryCode moved this to Done in H5 Apr 10, 2023
@ZakaryCode ZakaryCode added this to H5 Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Archived in project
Development

No branches or pull requests

4 participants