小程序转rn,目录结构缺失



  • 小程序转taro 在转rn,没有说编译成功,目录结构缺失@Taro 小助手 - honly
    yarn dev:rn 的运行结果:
    b0f1d0ee-5c33-4340-820c-bc8e23c04f1d-image.png
    运行目录:
    5b690321-3abf-48e0-bef3-ed7218add0f6-image.png

    细看这里报错,请问怎么处理,谢谢!!!!

    (node:39106) UnhandledPromiseRejectionWarning: TypeError: unknown: Cannot read property 'type' of undefined
        at PluginPass.JSXOpeningElement (/usr/local/lib/node_modules/@tarojs/cli/node_modules/_babel-plugin-transform-jsx-to-stylesheet@2.0.3@babel-plugin-transform-jsx-to-stylesheet/src/index.js:216:45)
        at newFn (/usr/local/lib/node_modules/@tarojs/cli/node_modules/_babel-traverse@6.26.0@babel-traverse/lib/visitors.js:276:21)
        at NodePath._call (/usr/local/lib/node_modules/@tarojs/cli/node_modules/_babel-traverse@6.26.0@babel-traverse/lib/path/context.js:76:18)
        at NodePath.call (/usr/local/lib/node_modules/@tarojs/cli/node_modules/_babel-traverse@6.26.0@babel-traverse/lib/path/context.js:48:17)
        at NodePath.visit (/usr/local/lib/node_modules/@tarojs/cli/node_modules/_babel-traverse@6.26.0@babel-traverse/lib/path/context.js:105:12)
        at TraversalContext.visitQueue (/usr/local/lib/node_modules/@tarojs/cli/node_modules/_babel-traverse@6.26.0@babel-traverse/lib/context.js:150:16)
        at TraversalContext.visitSingle (/usr/local/lib/node_modules/@tarojs/cli/node_modules/_babel-traverse@6.26.0@babel-traverse/lib/context.js:108:19)
        at TraversalContext.visit (/usr/local/lib/node_modules/@tarojs/cli/node_modules/_babel-traverse@6.26.0@babel-traverse/lib/context.js:192:19)
        at Function.traverse.node (/usr/local/lib/node_modules/@tarojs/cli/node_modules/_babel-traverse@6.26.0@babel-traverse/lib/index.js:114:17)
        at NodePath.visit (/usr/local/lib/node_modules/@tarojs/cli/node_modules/_babel-traverse@6.26.0@babel-traverse/lib/path/context.js:115:19)
    (node:39106) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 9)
    (node:39106) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    code_text
    


  • @左鱼子
    查资料说是环境问题,但是我环境是正确的,依然报UnhandledPromiseRejectionWarning的错误 @Taro-小助手-honly

    2c1d20bd-f18c-44aa-9d4c-d11edac550fb-image.png

    ~/.bash_profile

    export ANDROID_HOME=/Users/pgp/Library/Android/sdk
    export PATH=$PATH:$ANDROID_HOME/tools
    export PATH=$PATH:$ANDROID_HOME/platform-tools
    

登录后回复