NervJS / taro

开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/
https://docs.taro.zone/
Other
35.29k stars 4.76k forks source link

官方交流群 #198

Open luckyadam opened 6 years ago

luckyadam commented 6 years ago

目前 Taro 交流主要在微信群

Taro

其他交流群

Taro RN

Taro Vue

Taro Harmony

Taro Lark

NutUI x Taro

Taro UI

qinyang1980 commented 6 years ago

@luckyadam ,这个跨多端,有没有可能能支持Flutter呢?或者支持底层的FlutterEngine ?

johnbian commented 6 years ago

@qinyang1980 andy 感觉可能不大,flutter要是支持js 那估计有戏。

qinyang1980 commented 6 years ago

@johnbian ,谁说的。Nodejs底层是C++写的,上层不也是JS。桥接一把。

freecodemans commented 6 years ago

一直报错是咋个事,求回 taro init myApp D:\Program Files(x86)\nodejs\node_modules\@tarojs\cli\src\util\index.js:112 exports.replaceAsync = async function (str, regex, asyncFn) { ^^^^^^^^ SyntaxError: Unexpected token function at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (D:\Program Files(x86)\nodejs\node_modules\@tarojs\cli\bin\taro:4:44)

luckyadam commented 6 years ago

@freecodemans 你的 node 版本太低了

luckyadam commented 6 years ago

@qinyang1980 暂时没有计划支持 flutter 哦

gs19931024 commented 6 years ago

您好,按照文档编译h5的时候,会有报错,能麻烦您看一下吗? D:\work\taro\myApp>taro build --type h5 --watch 👽 Taro v0.0.69 开始编译项目 myApp 创建 发现文件 src\app.js 创建 发现文件 src\app.scss 创建 发现文件 src\index.html 创建 发现文件 src\pages\index\index.js 创建 发现文件 src\pages\index\index.scss (node:15940) UnhandledPromiseRejectionWarning: Error: Cannot find module 'webpack' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object. (D:\work\taro\myApp\node_modules_webpack-dev-server@3.1.4@webpack-dev-server\lib\Server.js:22:17) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) (node:15940) 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: 1) (node:15940) [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.

Superman-wc commented 6 years ago

想问一下怎么处理 less 的@import 报错, [Error: '../../common' wasn't found. Tried - ../../common.less,../../common.less]

找不到 @import引入的文件

luckyadam commented 6 years ago

@gs19931024 本地依赖没有完全装好

luckyadam commented 6 years ago

@Superman-wc 这个bug还没解决好

jiankian commented 6 years ago

支持其他第三方的React JS的组件吗?官方说支持Web RN 小程序,那组件会不会不支持那些reactJS的库呢,还是框架会转换编译出小程序框架?跟美团mpvue差别多大?在通用性上,就是真正的开发出来就到处运行(web 微信小程序 React Native App)

geekeryoung commented 6 years ago

我创建时开启了typescript,然后生成的app.tsx加载的那里有这么一行代码: Taro.render(<App/>, document.getElementById('app')); <App/>这里一直在报这个错: Error:(42, 13) TS2345: Argument of type 'Element' is not assignable to parameter of type 'Component<{}, {}>'. Property 'setState' is missing in type 'Element'. 虽然可以编译成功,但是总有一条红线看着好难受啊,求解决办法。

luckyadam commented 6 years ago

@geekeryoung 试试最新版本

falost commented 6 years ago

我创建了一个关于Taro的技术交流QQ群,希望大家可以加入交流! 只谈技术,不谈过往! 群号:854453745 taro

317540019 commented 6 years ago

abc@1.0.0 dev:h5 E:\nodejs\install\abc npm run build:h5 -- --watch

abc@1.0.0 build:h5 E:\nodejs\install\abc taro build --type h5 "--watch"

Taro v0.0.73

开始编译项目 abc 创建 发现文件 src\app.scss 创建 发现文件 src\app.tsx 创建 发现文件 src\index.html 创建 发现文件 src\pages\index\index.scss 创建 发现文件 src\pages\index\index.tsx

Compile successfully!

Listening at http://192.168.1.100:8080/ Listening at http://localhost:8080/

你好,有个问题请教 但是在浏览器预览时,http://localhost:8080/ ,总是空白,请问是什么原因呢?谢谢 项目也重新创建了几个来试了,都一样,小程序可以编译和预览

luckyadam commented 6 years ago

@317540019 试试最新的 1.0.0-beta.9 版本呢

317540019 commented 6 years ago

taro update 总是提示,命令错语

317540019 commented 6 years ago

谢谢,好了,可以更新了,正在更新

317540019 commented 6 years ago

E:\nodejs\install\abc>taro build --type h5 --watch Taro v1.0.0-beta.9

开始编译项目 abc 创建 发现文件 src\app.scss 创建 发现文件 src\app.tsx 创建 发现文件 src\index.html 创建 发现文件 src\pages\index\index.scss 创建 发现文件 src\pages\index\index.tsx

✅ Compile successfully!

ℹ️ Listening at http://192.168.1.100:8080/ ℹ️ Listening at http://localhost:8080/

监听文件修改中...

你好,编译成h5 ,预览时页面总是空白,"Hello world"显示不出来,并且没有错误提示。 而编译成小程序"Hello world"则能正常显示出来。

不知道什么原因,谢谢

anshixiaobai commented 6 years ago

子组件怎么调用父组件的方法 子组件怎么修改父组件的值 api上面没看到有些啊

zacksleo commented 6 years ago

@anshixiaobai 这个属于React的范畴呀

luckyadam commented 6 years ago

@IDrinkMoreWater 可以加啊

zacksleo commented 6 years ago

00:18 助手MM休息了呀

luckyadam commented 6 years ago

@zacksleo 也许是抠脚大汉,哈哈哈

qiuhd2015 commented 6 years ago

D:\wxapp_demo\taro\demo1>npm run dev:h5

demo1@1.0.0 dev:h5 D:\wxapp_demo\taro\demo1 npm run build:h5 -- --watch demo1@1.0.0 build:h5 D:\wxapp_demo\taro\demo1 taro build --type h5 "--watch" � Taro v1.0.0-beta.19 开始编译项目 demo1 创建 发现文件 src\app.css 创建 发现文件 src\app.js 创建 发现文件 src\index.html 创建 发现文件 src\pages\index\index.css 创建 发现文件 src\pages\index\index.js 缺少npm包@tarojs/webpack-runner,开始安装... Cannot download "https://r.cnpmjs.org/node-sass//v4.9.3/win32-x64-64_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location try setting a proxy via HTTP_PROXY, e.g.

  export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

第一次体验,按照文档编译预览提示上面的错误,单独安装 npm i @tarojs/webpack-runner也不行, 麻烦帮忙看下什么情况的

zacksleo commented 6 years ago

@qinyang1980 github访问超时了? 挂代理试试

geekyouth commented 6 years ago

我的github 首页竟然推荐了这个项目

Tjm1995 commented 6 years ago

小程序可以支持div这些自定义组件了,虽然默认是内联,但可以绑定事件,但通过taro写的div转成小程序,样式虽然正确,但绑定事件失效

luckyadam commented 6 years ago

@Tjm1995 在 Taro 里没有 div 组件,要使用基础组件库 @tarojs/components 来编写页面

zuojx1013 commented 6 years ago

@qiuhd2015 你好,跟你一样的问题,不知道有没有解决呢? 缺少npm包@tarojs/webpack-runner,开始安装... Cannot download "https://r.cnpmjs.org/node-sass//v4.9.3/win32-x64-64_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location try setting a proxy via HTTP_PROXY, e.g.

@zacksleo 已经搭梯子了

lavi2510 commented 6 years ago

编译为小程序预览时事件绑定失败 win10环境 Component "pages/component/index" does not have a method "onkindToggle" to handle event "tap".

lavi2510 commented 6 years ago

编译为小程序预览时事件绑定失败 win10环境 Component "pages/component/index" does not have a method "kindToggle" to handle event "tap".

dingjuanww commented 5 years ago

image 按照文档先编译了h5和小程序,没有问题,很流畅。 然后装了ios和android模拟器,npx taro build --type rn --watch也没问题,关掉客户端命令,回过头npx taro build --type h5 --watch就饱了上面图片的错误,不能编译了,什么原因呢 并没有其他的操作,也没有改变文件内容,只是各端切换编译而已。目前只有就npx taro build --type rn --watch,可以编译,h5和小程序就不行了

luckyadam commented 5 years ago

@dingjuanww 检查下本地依赖是否没有装好

dingjuanww commented 5 years ago

我是先编译了h5和小程序测试的,没有问题,很流畅。 然后编译rn,也没问题,可以在模拟器上看。 但是,我关掉模拟器,再编译h5就不行。。。报compile failed @luckyadam 本地依赖是没问题的呢 不然第一次编译h5和小程序应该就不能编译

Pines-Cheng commented 5 years ago

@dingjuanww taro 升级到最新版试试,最新版将 RN 端的临时目录改为 .rn_temp ,就不会有目录冲突了。

dingjuanww commented 5 years ago

@Pines-Cheng 已解决 谢谢

xqtian commented 5 years ago

编译报错,什么原因呢,求解答 fs.js:846 return binding.rmdir(pathModule._makeLong(path)); ^

Error: ENOTEMPTY: directory not empty, rmdir 'E:\Taro\taro_zhihu-master\dist\components' at Object.fs.rmdirSync (fs.js:846:18) at fs.readdirSync.forEach.file (C:\node_modules\@tarojs\cli\src\util\index.js:375:12) at Array.forEach () at Object.exports.emptyDirectory (C:\node_modules\@tarojs\cli\src\util\index.js:371:29) at build (C:\node_modules\@tarojs\cli\src\build.js:16:10) at Object. (C:\node_modules\@tarojs\cli\bin\taro-build:49:1) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12)

luckyadam commented 5 years ago

@xqtian #613

mindfocus commented 5 years ago

小助手不回复消息是什么情况嘞

igumiku commented 5 years ago

问个问题,为什么conponent生命周期这种没有直接被编译成小程序的component代码模板?不太懂

luckyadam commented 5 years ago

@tuzi8080808080 直接编译会有问题,通过运行时做了处理

liangtongzhuo commented 5 years ago

@tuzi8080808080 直接编译会有问题,通过运行时做了处理

你好 Taro.showModal 这种 API 文档里没有发现 - -,是个小程序同步吗?

jinjinjin0731 commented 5 years ago

@liangtongzhuo 善用文档搜索功能Taro.showModal

liangtongzhuo commented 5 years ago

@liangtongzhuo 善用文档搜索功能Taro.showModal

谢谢,- -

igumiku commented 5 years ago

@luckyadam 谢谢~具体会有什么问题?

luckyadam commented 5 years ago

@tuzi8080808080 生命周期并不能完全直接对应,你自己试试就知道了

LeonWuV commented 5 years ago

首页推荐的 star了

qq1311256696 commented 5 years ago

百度小程序可以用taro开发吗,为什么demo一上来就报一个错ReferenceError: my is not defined at index.js:3642 at Array.forEach () at processApis (index.js:3641) at initNativeApi (index.js:3746) at Object. (index.js:3771) at app.js:6008 at e (index.js:1) at index.js:1 at index.js:3 at e (index.js:1) (anonymous) @ index.js:3642 processApis @ index.js:3641 initNativeApi @ index.js:3746 (anonymous) @ index.js:3771 (anonymous) @ app.js:6008 e @ index.js:1 (anonymous) @ index.js:1 (anonymous) @ index.js:3 e @ index.js:1 (anonymous) @ index.js:1 (anonymous) @ app.js:21 e @ index.js:1 (anonymous) @ app.js:7385 C:\Users\HYS\AppData\Local\Programs\swan-ide-gui\resources\app\dist\electron\preload\webview.js:561 child exit with error code 1

lihe6666 commented 5 years ago

支持其他第三方的React JS的组件吗?官方说支持Web RN 小程序,那组件会不会不支持那些reactJS的库呢,还是框架会转换编译出小程序框架?跟美团mpvue差别多大?在通用性上,就是真正的开发出来就到处运行(web 微信小程序 React Native App)

是否支持引入 React Native 的第三方库?

由于 Taro RN 端是基于 Expo,因此不支持 需要自定义原生组件 的第三方库。