与此同时还有一个问题:新建项目的时候,node-sass报错,之后yarn安装node-sass成功,在装taro-ui的时候,如果用npm装的话又会提示已经安装好的node-sass报错,但是yarn就不会提示。。
13691505478_p
@13691505478_p
13691505478_p 发布的帖子
-
RE: RN和H5集成taro-ui后报错
-
RN和H5集成taro-ui后报错
我在项目中,集成taro-ui后,就会报错:“The module
./components/calendar
could not be found”。新项目和已经开发了一阵子的单窗口项目都会出现这个问题,rn和h5都有,其他还没试。请问这是怎么回事?怎么能解决一下?谢谢
复现方式:新建项目,或成功运行的项目,运行yarn add taro-ui,之后使用taro-ui的控件进行开发;
复线概率:每次都复现,新项目建了两个,已经完成的demo项目一个,全部出现;
报错如下:
BUNDLE [android, dev] rn_temp/index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1/1), done.error: bundling failed: Error: Unable to resolve module
./components/calendar
from/Users/gaoguanxiong/Desktop/test/rnTest/nmi/nmi/node_modules/taro-ui/dist/weapp/index.js
: The module./components/calendar
could not be found from/Users/gaoguanxiong/Desktop/test/rnTest/nmi/nmi/node_modules/taro-ui/dist/weapp/index.js
. Indeed, none of these files exist:/Users/gaoguanxiong/Desktop/test/rnTest/nmi/nmi/node_modules/taro-ui/dist/weapp/components/calendar(.native||.android.js|.native.js|.js|.android.json|.native.json|.json)
/Users/gaoguanxiong/Desktop/test/rnTest/nmi/nmi/node_modules/taro-ui/dist/weapp/components/calendar/index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json)
at ModuleResolver.resolveDependency (/Users/gaoguanxiong/Desktop/test/rnTest/nmi/nmi/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:161:851)
at ResolutionRequest.resolveDependency (/Users/gaoguanxiong/Desktop/test/rnTest/nmi/nmi/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:91:16)
at DependencyGraph.resolveDependency (/Users/gaoguanxiong/Desktop/test/rnTest/nmi/nmi/node_modules/metro/src/node-haste/DependencyGraph.js:272:4579)
at /Users/gaoguanxiong/Desktop/test/rnTest/nmi/nmi/node_modules/metro/src/DeltaBundler/traverseDependencies.js:376:19
at Array.map (<anonymous>)
at resolveDependencies (/Users/gaoguanxiong/Desktop/test/rnTest/nmi/nmi/node_modules/metro/src/DeltaBundler/traverseDependencies.js:374:16)
at /Users/gaoguanxiong/Desktop/test/rnTest/nmi/nmi/node_modules/metro/src/DeltaBundler/traverseDependencies.js:212:33
at Generator.next (<anonymous>)
at step (/Users/gaoguanxiong/Desktop/test/rnTest/nmi/nmi/node_modules/metro/src/DeltaBundler/traverseDependencies.js:297:313)
at /Users/gaoguanxiong/Desktop/test/rnTest/nmi/nmi/node_modules/metro/src/DeltaBundler/traverseDependencies.js:297:473
DELTA [android, dev] rn_temp/index.js ░░░░░░░░░░░░░░░░ 0.0% (0/1), failed.
-
react-native run-ios找不到模拟器
我装了xcode,能够顺利开发react-native应用和iOS原生应用,但是taro运行的时候提示“Could not find iPhone 6 simulator”;强制使用其他版本的模拟器运行的时候,同样提示找不到相应的simulator,请问这是怎么回事?网上的改module代码的方式无效。
macbook版本:10.15.1
xcode版本:Version 11.1 (11A1027) -
RE: 关于微信小程序进行taro convert
@Taro-小助手-honly 是这个框架,这个框架转完之后改的不多,但是其他东西改的太多了,比如不知道哪儿蹦出来的self,不知道哪儿蹦出来的各种组建和变量,等等。。问题超级多
-
关于微信小程序进行taro convert
convert之后,代码出现了好多好多问题,解决了两天,现在遇到一个情况:原来我们的代码用的是fly框架,在convert之后各种报错。。请问这个问题哪位遇见过?有什么解决方法吗?另外,还有什么其他的问题遇见过的吗?
-
新建项目集成RN的小问题
请问,新建的项目,是需要在根目录里面运行react-native upgrade来通过RN自动生成native代码,还是clone空壳子到根目录下?
自动生成的native代码,跑的时候跑不起来;
clone空壳子到根目录,然后再npm i,然后在壳子里面run的时候,会提示有两个react-native依赖,分别在rn-temp文件夹的node-modules目录和空壳子的node-modules目录下。。
不知道怎么弄了,请大神赐教,谢谢 -
RE: 编译运行一步一个坑,你们的破文档能改改吗?
@Taro-小助手-honly
给官方个建议啊。。前面都没问题,就是clone空壳开始,各种坑。。
首先,clone的地址有问题,clone不下来;
然后进入git,用git上面提供的地址clone下来之后,不知道放在哪儿;
然后,放到了项目根目录,进去npm i,缺少东西,现在我知道缺少的这个fsevents是npm出的问题,得手动配置一下mac的package。json文件才行;
然后,npm安装完成之后,run的时候,提示react-native和相关的依赖,在应用里面找到了两份。。
从这边开始往后希望能优化一下,要不像我这样折腾了三天了还是没弄好。。 -
RE: 新建的安卓应用提示找不到index.android.bundle
@蜘蛛paipai 不是生产方式。我重新建了个应用,从git上下载空壳,npm i,然后run-android,结果提示有两个react-native,分别在项目根目录的node-modules和空壳的node-modules文件夹。请问这个应该如何解决?是不是要把空壳里面的内容复制粘贴到项目的根目录?还是说把项目根目录中的react-native这个依赖给删除掉?谢谢。这个弄了三天了还没有出个东西,太烧脑了