You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
浏览器控制台报错内容:
index.esm.js?130d:2473 Error: Please pass a valid component to 'observer'
at observer (index.esm.js?a262:234)
at eval (index.js?3db4:7)
at Module../.temp/pages/sdd/pagebase/index.js (rpwall_exchangedetail_indexrpwall_home_indexrpwall_inviteregister_indexrpwall_mine_indexrpwall_m~f63cc8f8.2b31a5be.js:23)
at webpack_require (app.dc714345.js:767)
at fn (app.dc714345.js:130)
at eval (index.js:11)
at Module../.temp/pages/sdd/home/index.js (sdd_home_index.0df02893.js:11)
at webpack_require (app.dc714345.js:767)
at fn (app.dc714345.js:130)
./node_modules/_@[email protected]@@tarojs/mobx-h5/dist/index.esm.js 5:0-111
" '@tarojs/mobx-common' does not contain an export named 'PropTypes'.
./node_modules/_@[email protected]@@tarojs/mobx-h5/dist/index.esm.js 221:13-22
" '@tarojs/mobx-common' does not contain an export named 'PropTypes'.
./node_modules/_@[email protected]@@tarojs/mobx-h5/dist/index.esm.js 203:43-56
" '@tarojs/mobx-common' does not contain an export named 'getInjectName'.
./node_modules/_@[email protected]@@tarojs/mobx-h5/dist/index.esm.js 5:0-111
" '@tarojs/mobx-common' does not contain an export named 'isUsingStaticRendering'.
./node_modules/_@[email protected]@@tarojs/mobx-h5/dist/index.esm.js 228:26-48
" '@tarojs/mobx-common' does not contain an export named 'isUsingStaticRendering'.
./node_modules/_@[email protected]@@tarojs/mobx-h5/dist/index.esm.js 217:9-30
" '@tarojs/mobx-common' does not contain an export named 'useAsObservableSource'.
./node_modules/_@[email protected]@@tarojs/mobx-h5/dist/index.esm.js 213:9-22
" '@tarojs/mobx-common' does not contain an export named 'useLocalStore'.
./node_modules/_@[email protected]@@tarojs/mobx-h5/dist/index.esm.js 5:0-111
" '@tarojs/mobx-common' does not contain an export named 'useStaticRendering'.
./node_modules/_@[email protected]@@tarojs/mobx-h5/dist/index.esm.js 229:22-40
" '@tarojs/mobx-common' does not contain an export named 'useStaticRendering'.
问题描述
在taro1.3.10版本,
mobx会报错
把package.json的mobx-h5降到1.3.5就不报了, (1.3.6-1.3.10会报错)
但是旧版本用不了新的mobxhooks
浏览器控制台报错内容:
index.esm.js?130d:2473 Error: Please pass a valid component to 'observer'
at observer (index.esm.js?a262:234)
at eval (index.js?3db4:7)
at Module../.temp/pages/sdd/pagebase/index.js (rpwall_exchangedetail_index
rpwall_home_indexrpwall_inviteregister_indexrpwall_mine_indexrpwall_m~f63cc8f8.2b31a5be.js:23)at webpack_require (app.dc714345.js:767)
at fn (app.dc714345.js:130)
at eval (index.js:11)
at Module../.temp/pages/sdd/home/index.js (sdd_home_index.0df02893.js:11)
at webpack_require (app.dc714345.js:767)
at fn (app.dc714345.js:130)
代码报错的地方:
@observer
@Inject('xxx')
nodejs报错内容:
⚠ Compiled with warnings.
./node_modules/_@[email protected]@@tarojs/mobx-h5/dist/index.esm.js 5:0-111
" '@tarojs/mobx-common' does not contain an export named 'PropTypes'.
./node_modules/_@[email protected]@@tarojs/mobx-h5/dist/index.esm.js 221:13-22
" '@tarojs/mobx-common' does not contain an export named 'PropTypes'.
./node_modules/_@[email protected]@@tarojs/mobx-h5/dist/index.esm.js 203:43-56
" '@tarojs/mobx-common' does not contain an export named 'getInjectName'.
./node_modules/_@[email protected]@@tarojs/mobx-h5/dist/index.esm.js 5:0-111
" '@tarojs/mobx-common' does not contain an export named 'isUsingStaticRendering'.
./node_modules/_@[email protected]@@tarojs/mobx-h5/dist/index.esm.js 228:26-48
" '@tarojs/mobx-common' does not contain an export named 'isUsingStaticRendering'.
./node_modules/_@[email protected]@@tarojs/mobx-h5/dist/index.esm.js 217:9-30
" '@tarojs/mobx-common' does not contain an export named 'useAsObservableSource'.
./node_modules/_@[email protected]@@tarojs/mobx-h5/dist/index.esm.js 213:9-22
" '@tarojs/mobx-common' does not contain an export named 'useLocalStore'.
./node_modules/_@[email protected]@@tarojs/mobx-h5/dist/index.esm.js 5:0-111
" '@tarojs/mobx-common' does not contain an export named 'useStaticRendering'.
./node_modules/_@[email protected]@@tarojs/mobx-h5/dist/index.esm.js 229:22-40
" '@tarojs/mobx-common' does not contain an export named 'useStaticRendering'.
复现步骤
升级至1.3.6和以后的版本
运行npm run dev:h5
系统信息
👽 Taro v1.3.10
Taro CLI 1.3.10 environment info:
System:
OS: Windows 10
Binaries:
Node: 10.16.0 - E:\nodejs\node.EXE
npm: 6.9.0 - E:\nodejs\npm.CMD
补充信息
[可选]
[根据你的调查研究,出现这个问题的原因可能在哪里?]
The text was updated successfully, but these errors were encountered: