-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
第一次npm run dev:rn 编译时:Cannot find module 'fbjs/lib/keyMirror' #2121
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
CC @Pines-Cheng |
刚学,启动也是报错,这个可用,感谢 |
我也是这个问题 |
windows在如下目录,仅在win10测试 |
我在taro版本1.213和1.2.14都遇到了这个问题,我的解决方案是(/Users/harry/.config/yarn/global/node_modules/@tarojs/cli/src/rn/StyleSheet/ImageResizeMode.js:15:19)根据这个文件定位到@tarojs/cli的下载目录(你的路径可能是/Users/harry/.config/yarn/global/node_modules/@tarojs/cli),通过查看package.json,依赖中是没有fbjs的,在他的目录下通过命令npm i -S fbjs将fbjs依赖加进去,然后在执行npm run dev:rn就可以启动了 |
@eyelly-wu 的方法可以解决,原因会不会是这个:facebook/prop-types#194 |
哈哈,是这个原因呢,在@tarojs/cli的package.json中将fbjs依赖(如果我们自己加了的话)移除,将prop-types的版本改成15.6.1或更老(15.6.2就移除fbjs了),npm urn dev:rn可以正常执行,厉害了 |
全局安装的 |
如果进去了@taro/cli , npm install fbjs安装如果一直失败, 那就删除@taro 重新安装下npm install -g @tarojs/cli(会安装最新的版本) 然后确定是用管理员打开命令窗口(非管理员模式下不让全局写入),然后执行 npm install fbjs 就可以了。 |
问题描述
第一次npm run dev:rn 编译时:Cannot find module 'fbjs/lib/keyMirror'
复现步骤
[复现问题的步骤]
期望行为
编译成功
报错信息
系统信息
Taro CLI 1.2.12 environment info:
System:
OS: macOS 10.14.2
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.15.0 - ~/.nvm/versions/node/v8.15.0/bin/node
Yarn: 1.13.0 - ~/.yarn/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v8.15.0/bin/npm
npmPackages:
@tarojs/components: 1.2.12 => 1.2.12
@tarojs/plugin-babel: 1.2.12 => 1.2.12
@tarojs/plugin-csso: 1.2.12 => 1.2.12
@tarojs/plugin-less: 1.2.12 => 1.2.12
@tarojs/plugin-uglifyjs: 1.2.12 => 1.2.12
@tarojs/router: 1.2.12 => 1.2.12
@tarojs/taro: 1.2.12 => 1.2.12
@tarojs/taro-alipay: 1.2.12 => 1.2.12
@tarojs/taro-h5: 1.2.12 => 1.2.12
@tarojs/taro-swan: 1.2.12 => 1.2.12
@tarojs/taro-tt: 1.2.12 => 1.2.12
@tarojs/taro-weapp: 1.2.12 => 1.2.12
@tarojs/webpack-runner: 1.2.12 => 1.2.12
eslint-config-taro: 1.2.12 => 1.2.12
eslint-plugin-taro: 1.2.12 => 1.2.12
nervjs: ^1.3.9 => 1.3.12
补充信息
[可选]
[根据你的调查研究,出现这个问题的原因可能在哪里?]
The text was updated successfully, but these errors were encountered: