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
一直报错是咋个事,求回
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)
您好,按照文档编译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.
我创建时开启了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'.
虽然可以编译成功,但是总有一条红线看着好难受啊,求解决办法。
Activity
qinyang1980 commentedon Jun 27, 2018
@luckyadam ,这个跨多端,有没有可能能支持Flutter呢?或者支持底层的FlutterEngine ?
johnbian commentedon Jun 28, 2018
@qinyang1980 andy 感觉可能不大,flutter要是支持js 那估计有戏。
qinyang1980 commentedon Jun 28, 2018
@johnbian ,谁说的。Nodejs底层是C++写的,上层不也是JS。桥接一把。
freecodemans commentedon Jul 4, 2018
一直报错是咋个事,求回
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 commentedon Jul 5, 2018
@freecodemans 你的 node 版本太低了
luckyadam commentedon Jul 5, 2018
@qinyang1980 暂时没有计划支持 flutter 哦
gs19931024 commentedon Jul 12, 2018
您好,按照文档编译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 commentedon Jul 12, 2018
想问一下怎么处理 less 的@import 报错,
[Error: '../../common' wasn't found. Tried - ../../common.less,../../common.less]
找不到 @import引入的文件
luckyadam commentedon Jul 12, 2018
@gs19931024 本地依赖没有完全装好
luckyadam commentedon Jul 12, 2018
@Superman-wc 这个bug还没解决好
jiankian commentedon Jul 21, 2018
支持其他第三方的React JS的组件吗?官方说支持Web RN 小程序,那组件会不会不支持那些reactJS的库呢,还是框架会转换编译出小程序框架?跟美团mpvue差别多大?在通用性上,就是真正的开发出来就到处运行(web 微信小程序 React Native App)
geekeryoung commentedon Jul 25, 2018
我创建时开启了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 commentedon Jul 25, 2018
@geekeryoung 试试最新版本
falost commentedon Aug 3, 2018
317540019 commentedon Aug 10, 2018
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/ ,总是空白,请问是什么原因呢?谢谢
项目也重新创建了几个来试了,都一样,小程序可以编译和预览
320 remaining items
anshixiaobai commentedon Jan 8, 2026
liliewin commentedon Jan 8, 2026
qq1311256696 commentedon Jan 8, 2026
xiaotimo commentedon Jan 10, 2026
有人维护吗?群是满员啊
kuma0605 commentedon Mar 3, 2026
有新群吗?
anshixiaobai commentedon Mar 3, 2026
ciloi commentedon Mar 3, 2026
liliewin commentedon Mar 3, 2026
qq1311256696 commentedon Mar 3, 2026
wz980701 commentedon Mar 9, 2026
有新群吗
JoshYuJump commentedon Sep 7, 2026
Taro 开发交流群 47(等待加入~)-- 群已满人,有新群吗?
anshixiaobai commentedon Sep 7, 2026
ciloi commentedon Sep 7, 2026
liliewin commentedon Sep 7, 2026
qq1311256696 commentedon Sep 7, 2026