Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

执行 @tarojs/cli-convertor 报错:转换失败 Unterminated string constant. (1:53) #16819

Open
S7245 opened this issue Nov 7, 2024 · 0 comments
Labels
A-taroize Area - Taro convert 相关

Comments

@S7245
Copy link

S7245 commented Nov 7, 2024

相关平台

微信小程序

复现仓库

https://gist.github.com/S7245/2076cd3eda053ded84375004609d208a
小程序基础库: 3.6.3
使用框架: React

复现步骤

  1. 根据说明文档,在 微信小程序项目根目录下执行转换命令:$ npx @tarojs/cli-convertor
  2. 转换报错:
错误  页面转换  coursePage/schedule/order.js
页面: coursePage/schedule/order转换失败 Unterminated string constant. (1:53)

这个报错文件的源代码(order.js): https://gist.github.com/S7245/1ec82823ca2943b142e3838c127b7c22

期望结果

可以把微信小程序项目转换成 Taro项目运行,

实际结果

转换结果报错!

环境信息

👽 Taro v4.0.6


  Taro CLI 4.0.6 environment info:
    System:
      OS: macOS 12.7.4
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 20.17.0 - /usr/local/bin/node
      Yarn: 1.22.21 - /usr/local/bin/yarn
      npm: 10.8.2 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: 4.0.6 => 4.0.6 
      @tarojs/components: 4.0.6 => 4.0.6 
      @tarojs/helper: 4.0.6 => 4.0.6 
      @tarojs/plugin-framework-react: 4.0.6 => 4.0.6 
      @tarojs/plugin-platform-alipay: 4.0.6 => 4.0.6 
      @tarojs/plugin-platform-h5: 4.0.6 => 4.0.6 
      @tarojs/plugin-platform-harmony-hybrid: 4.0.6 => 4.0.6 
      @tarojs/plugin-platform-jd: 4.0.6 => 4.0.6 
      @tarojs/plugin-platform-qq: 4.0.6 => 4.0.6 
      @tarojs/plugin-platform-swan: 4.0.6 => 4.0.6 
      @tarojs/plugin-platform-tt: 4.0.6 => 4.0.6 
      @tarojs/plugin-platform-weapp: 4.0.6 => 4.0.6 
      @tarojs/react: 4.0.6 => 4.0.6 
      @tarojs/runtime: 4.0.6 => 4.0.6 
      @tarojs/shared: 4.0.6 => 4.0.6 
      @tarojs/taro: 4.0.6 => 4.0.6 
      @tarojs/taro-loader: 4.0.6 => 4.0.6 
      @tarojs/webpack5-runner: 4.0.6 => 4.0.6 
      @tarojs/with-weapp: ^4.0.6 => 4.0.7 
      babel-preset-taro: 4.0.6 => 4.0.6 
      eslint-config-taro: 4.0.6 => 4.0.6 
      react: ^18.0.0 => 18.3.1 
@TheKonka TheKonka added the A-taroize Area - Taro convert 相关 label Nov 8, 2024
This was referenced Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-taroize Area - Taro convert 相关
Projects
None yet
Development

No branches or pull requests

2 participants