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

小程序报错 #7001

Closed
fandych opened this issue Jul 10, 2020 · 1 comment
Closed

小程序报错 #7001

fandych opened this issue Jul 10, 2020 · 1 comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@fandych
Copy link

fandych commented Jul 10, 2020

相关平台

微信小程序

复现仓库

https://github.com/FandyChen/testTaro
小程序基础库: 2.11.3
使用框架: React

复现步骤

  1. git clone
  2. npm install
  3. npm run dev:weapp
    4.  打开微信开发者工具,导入dist,控制台报错

期望结果

正常显示页面

实际结果

控制台报错
The above error occurred in the component:
in AppWrapper

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
console.error @ VM398:1
logCapturedError @ app.js:11904
logError @ app.js:11941
update.callback @ app.js:13293
callCallback @ app.js:3685
commitUpdateEffects @ app.js:3723
commitUpdateQueue @ app.js:3711
commitLifeCycles @ app.js:12221
commitLayoutEffects @ app.js:15399
invokeGuardedCallbackImpl @ app.js:11629
invokeGuardedCallback @ app.js:11806
commitRootImpl @ app.js:15137
unstable_runWithPriority @ app.js:18719
runWithPriority @ app.js:1961
commitRoot @ app.js:14986
finishSyncRender @ app.js:14390
performSyncWorkOnRoot @ app.js:14368
(anonymous) @ app.js:2011
unstable_runWithPriority @ app.js:18719
runWithPriority @ app.js:1961
flushSyncCallbackQueueImpl @ app.js:2006
flushSyncCallbackQueue @ app.js:1994
scheduleUpdateOnFiber @ app.js:13770
enqueueForceUpdate @ app.js:3889
push../node_modules/react/cjs/react.development.js.Component.forceUpdate @ vendors.js:12567
mount @ taro.js:17563
mount @ taro.js:17653
onLoad @ taro.js:17198
(anonymous) @ VM405 WAService.js:2
p.callPageLifeTime @ VM405 WAService.js:2
jt @ VM405 WAService.js:2
(anonymous) @ VM405 WAService.js:2
Mt @ VM405 WAService.js:2
(anonymous) @ VM405 WAService.js:2
(anonymous) @ VM405 WAService.js:2
i.emit @ VM405 WAService.js:2
emit @ VM405 WAService.js:2
(anonymous) @ VM405 WAService.js:2
i.emit @ VM405 WAService.js:2
emit @ VM405 WAService.js:2
(anonymous) @ VM405 WAService.js:2
(anonymous) @ VM405 WAService.js:2
o @ VM402 asdebug.js:1
(anonymous) @ VM402 asdebug.js:1
(anonymous) @ VM402 asdebug.js:1
_ws.onmessage @ VM402 asdebug.js:1
Show 16 more frames
VM398:1 MiniProgramError
没有找到页面实例。
如有疑问,请提交 issue 至:https://github.com/nervjs/taro/issues
Error: 没有找到页面实例。
如有疑问,请提交 issue 至:https://github.com/nervjs/taro/issues
at ensure (http://127.0.0.1:51399/appservice/__APP__/appservice.js:14518:11)
at AppWrapper. (http://127.0.0.1:51399/appservice/__APP__/appservice.js:17651:9)
at callCallback (http://127.0.0.1:51399/appservice/__APP__/appservice.js:51628:12)
at commitUpdateEffects (http://127.0.0.1:51399/appservice/__APP__/appservice.js:51666:7)
at commitUpdateQueue (http://127.0.0.1:51399/appservice/__APP__/appservice.js:51654:3)
at commitLifeCycles (http://127.0.0.1:51399/appservice/__APP__/appservice.js:60139:11)
at commitLayoutEffects (http://127.0.0.1:51399/appservice/__APP__/appservice.js:63342:7)
at Object.invokeGuardedCallbackImpl (http://127.0.0.1:51399/appservice/__APP__/appservice.js:59572:10)
at invokeGuardedCallback (http://127.0.0.1:51399/appservice/__APP__/appservice.js:59749:31)
at commitRootImpl (http://127.0.0.1:51399/appservice/__APP__/appservice.js:63080:9)

环境信息

Taro v3.0.2


  Taro CLI 3.0.2 environment info:
    System:
      OS: macOS 10.15.5
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 12.16.3 - /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.2 => 3.0.2 
      @tarojs/mini-runner: 3.0.2 => 3.0.2 
      @tarojs/react: 3.0.2 => 3.0.2 
      @tarojs/runtime: 3.0.2 => 3.0.2 
      @tarojs/taro: 3.0.2 => 3.0.2 
      @tarojs/webpack-runner: 3.0.2 => 3.0.2 
      babel-preset-taro: 3.0.2 => 3.0.2 
      eslint-config-taro: 3.0.2 => 3.0.2 
      nervjs: ^1.5.7 => 1.5.7 
      react: ^16.10.0 => 16.13.1 
      taro-ui: ^3.0.0-alpha.3 => 3.0.0-alpha.3 
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Jul 10, 2020
@fandych
Copy link
Author

fandych commented Jul 10, 2020

在初始化项目时,无意中添加了nervjs, 删除nervjs,报错消失。

nervjs: ^1.5.7 => 1.5.7 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

1 participant