SunnyQjm / taro-cropper

Taro框架下的跨端图片裁剪组件,目前支持微信小程序端,QQ小程序端, 支付宝小程序端, 字节跳动小程序端, 百度小程序端和H5端
https://sunnyqjm.github.io/taro-cropper/#/
111 stars 45 forks source link

taro3.1.0更新到3.2.0报错 #32

Open LLLLLLLX opened 2 years ago

LLLLLLLX commented 2 years ago

🙅 编译失败. 2022/8/22 下午1:47:51

./node_modules/taro-cropper/dist/weapp/components/taro-cropper/index.tsx Module build failed (from ./node_modules/@tarojs/mini-runner/node_modules/babel-loader/lib/index.js): SyntaxError: E:\project\deepexi-dm-mobile1\node_modules\taro-cropper\dist\weapp\components\taro-cropper\index.tsx: Unexpected reserved word 'interface'. (10:0)

8 | 9 |

10 | interface TaroCropperComponentProps { | ^ 11 | cropperCanvasId: string, // 画布id 12 | cropperCutCanvasId: string, // 用于裁剪的canvas id 13 | width: number, // 组件宽度

监听文件修改中... 9 |

10 | interface TaroCropperComponentProps { | ^ 11 | cropperCanvasId: string, // 画布id 12 | cropperCutCanvasId: string, // 用于裁剪的canvas id 13 | width: number, // 组件宽度

(node:27628) UnhandledPromiseRejectionWarning: [object Array] (Use node --trace-warnings ... to show where the warning was created) (node:27628) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5) (node:27628) [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.

hwl0123 commented 1 year ago

我也遇到了,怎么解决?

hwl0123 commented 1 year ago

我也遇到了,怎么解决?

taro v3.x React

如果使用Taro3进行开发,且使用的React进行开发,则可以选择安装下述包。目前在微信小程序端测试成功,H5端因为taro实现的一些问题,暂时还有问题。

npm install --save taro-cropper@react