Code Monkey home page Code Monkey logo

uni-migration's Issues

小程序转快应用,编译时报错,不知道什么错误,有大神遇到过吗?

[HBuilder] 16:01:42.316 D:\HBuilderX\HBuilderX\plugins\quickapp\src\app
[HBuilder] 16:01:42.318 D:\HBuilderX\HBuilderX\plugins\quickapp\node_modules\quickapp-tools\webpack.config.js:296
[HBuilder] 16:01:42.332 throw new Error(Unknown node environment: ${NODE_ENV})
[HBuilder] 16:01:42.334 ^
[HBuilder] 16:01:42.346 Error: Unknown node environment: true-ol
[HBuilder] 16:01:42.348 at parse (D:\HBuilderX\HBuilderX\plugins\quickapp\node_modules\quickapp-tools\webpack.config.js:296:13)
[HBuilder] 16:01:42.360 at Object. (D:\HBuilderX\HBuilderX\plugins\quickapp\node_modules\quickapp-tools\webpack.config.js:124:18)
[HBuilder] 16:01:42.362 at Module._compile (module.js:652:30)
[HBuilder] 16:01:42.373 at Object.Module._extensions..js (module.js:663:10)
[HBuilder] 16:01:42.375 at Module.load (module.js:565:32)
[HBuilder] 16:01:42.387 at tryModuleLoad (module.js:505:12)
[HBuilder] 16:01:42.388 at Function.Module._load (module.js:497:3)
[HBuilder] 16:01:42.400 at Module.require (module.js:596:17)
[HBuilder] 16:01:42.402 at require (internal/module.js:11:18)
[HBuilder] 16:01:42.413 at requireConfig (D:\HBuilderX\HBuilderX\plugins\node_modules\webpack\bin\convert-argv.js:96:18)

TypeError: Cannot set property 'sign' of undefined

TypeError: Cannot set property 'sign' of undefined
at module.exports (/usr/local/lib/node_modules/uni-migration/lib/index.js:1:669)
at Object. (/usr/local/lib/node_modules/uni-migration/bin/uni-migration.js:44:3)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Function.Module.runMain (module.js:676:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3

onLoad的options参数为空

转换成快应用后onLoad的参数options一直为空,改成快应用的路由传参也无法取到值;
pageQuery根本就没传进来;

尤其是作为模板属性的转换

尤其是作为模板属性的转换,尤其是作为模板属性的转换,例如:

    <import src="/component/tmpl/myToast.wxml"/>
    <template is="myoastTmpl" data="{{...toastContent}}"/>

转换小程序代码出错

/usr/local/lib/node_modules/uni-migration/node_modules/babel-core/lib/transformation/file/index.js:590
throw err;
^

SyntaxError: unknown: Unexpected token (23:19)
21 | }
22 |

23 | static propTypes = {
| ^
24 | setLocation: func,
25 | locationInfo: object,
26 | navigatorInfo: object
at Parser.pp$5.raise (/usr/local/lib/node_modules/uni-migration/node_modules/babylon/lib/index.js:4454:13)
at Parser.pp.unexpected (/usr/local/lib/node_modules/uni-migration/node_modules/babylon/lib/index.js:1761:8)
at Parser.pp$1.parseClassProperty (/usr/local/lib/node_modules/uni-migration/node_modules/babylon/lib/index.js:2571:50)
at Parser.pp$1.parseClassBody (/usr/local/lib/node_modules/uni-migration/node_modules/babylon/lib/index.js:2516:34)
at Parser.pp$1.parseClass (/usr/local/lib/node_modules/uni-migration/node_modules/babylon/lib/index.js:2406:8)
at Parser.pp$1.parseStatement (/usr/local/lib/node_modules/uni-migration/node_modules/babylon/lib/index.js:1843:19)
at Parser.pp$1.parseBlockBody (/usr/local/lib/node_modules/uni-migration/node_modules/babylon/lib/index.js:2268:21)
at Parser.pp$1.parseTopLevel (/usr/local/lib/node_modules/uni-migration/node_modules/babylon/lib/index.js:1778:8)
at Parser.parse (/usr/local/lib/node_modules/uni-migration/node_modules/babylon/lib/index.js:1673:17)
at parse (/usr/local/lib/node_modules/uni-migration/node_modules/babylon/lib/index.js:7305:37)

微信小程序转快应用报错

[HBuilder] C:\Users\gyfeng1003\Downloads\HBuilderX.0.1.33.20180505-alpha.full\HBuilderX\plugins\uni-migration\lib\weapp\transform\page-rewriter\template-rewriter\style.js:1
(function (exports, require, module, __filename, __dirname) { 'use strict';var _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&'function'==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?'symbol':typeof obj};Object.defineProperty(exports,'__esModule',{value:!0});exports.default=rewriteStyle;var _utils=require('../../../../utils'),_util=require('../../helper/style/util'),_declaration=require('../../helper/style/declaration'),processInlineDeclaration=function(declaration,output,location){var ret=[];if(0===declaration.property.indexOf('-webkit-')&&(declaration.property=declaration.property.replace('-webkit-','')),declaration.value=(0,_util.processDeclarationValue)(declaration.value),_declaration.declarations.hasOwnProperty(declaration.property)){var processD

TypeError: Cannot read property 'logs' of undefined
at processInlineDeclaration (C:\Users\gyfeng1003\Downloads\HBuilderX.0.1.33.20180505-alpha.full\HBuilderX\plugins\uni-migration\lib\weapp\transform\page-rewriter\template-rewriter\style.js:1:1718)
at C:\Users\gyfeng1003\Downloads\HBuilderX.0.1.33.20180505-alpha.full\HBuilderX\plugins\uni-migration\lib\weapp\transform\page-rewriter\template-rewriter\style.js:1:2211
at Array.forEach ()
at rewriteStyle (C:\Users\gyfeng1003\Downloads\HBuilderX.0.1.33.20180505-alpha.full\HBuilderX\plugins\uni-migration\lib\weapp\transform\page-rewriter\template-rewriter\style.js:1:2093)
at C:\Users\gyfeng1003\Downloads\HBuilderX.0.1.33.20180505-alpha.full\HBuilderX\plugins\uni-migration\lib\weapp\transform\page-rewriter\template-rewriter\node.js:1:2501
at Array.forEach ()
at walk (C:\Users\gyfeng1003\Downloads\HBuilderX.0.1.33.20180505-alpha.full\HBuilderX\plugins\uni-migration\lib\weapp\transform\page-rewriter\template-rewriter\node.js:1:2444)
at C:\Users\gyfeng1003\Downloads\HBuilderX.0.1.33.20180505-alpha.full\HBuilderX\plugins\uni-migration\lib\weapp\transform\page-rewriter\template-rewriter\node.js:1:3773
at Array.forEach ()
at rewriteNode (C:\Users\gyfeng1003\Downloads\HBuilderX.0.1.33.20180505-alpha.full\HBuilderX\plugins\uni-migration\lib\weapp\transform\page-rewriter\template-rewriter\node.js:1:3743)
[HBuilder] 项目【wechatapp-uniapp】转换结束

生成rpk文件由于空格问题报错

如题,小程序转换快应用时成功,生成rpk文件时由于空格压缩导致关键字和变量名粘合导致变量名命名中出现关键字导致报错。

具体代码如下:
快应用中代码:
let token = await $$polyfill$$.getStrageSync("token")

打包后的代码:
let token = await_$$polyfill$$_.getStrageSync("token");

打包的转换器在空格处理上是否有瑕疵呢

移植视频小程序发生转换器错误

二话不说,直接上报错信息。

HBuilder] /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uni-migration/lib/weapp/transform/page-rewriter/template-rewriter/style.js:1
(function (exports, require, module, __filename, __dirname) { 'use strict';var _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&'function'==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?'symbol':typeof obj};Object.defineProperty(exports,'__esModule',{value:!0});exports.default=rewriteStyle;var _utils=require('../../../../utils'),_util=require('../../helper/style/util'),_declaration=require('../../helper/style/declaration'),processInlineDeclaration=function(declaration,output,location){var ret=[];if(0===declaration.property.indexOf('-webkit-')&&(declaration.property=declaration.property.replace('-webkit-','')),declaration.value=(0,_util.processDeclarationValue)(declaration.value),_declaration.declarations.hasOwnProperty(declaration.property)){var processDeclaration=_declaration.declar

TypeError: Cannot read property 'logs' of undefined
at processInlineDeclaration (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uni-migration/lib/weapp/transform/page-rewriter/template-rewriter/style.js:1:1718)
at /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uni-migration/lib/weapp/transform/page-rewriter/template-rewriter/style.js:1:2211
at Array.forEach ()
at rewriteStyle (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uni-migration/lib/weapp/transform/page-rewriter/template-rewriter/style.js:1:2093)
at /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uni-migration/lib/weapp/transform/page-rewriter/template-rewriter/node.js:1:2501
at Array.forEach ()
at walk (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uni-migration/lib/weapp/transform/page-rewriter/template-rewriter/node.js:1:2444)
at /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uni-migration/lib/weapp/transform/page-rewriter/template-rewriter/node.js:1:3447
at Array.forEach ()
at walk (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uni-migration/lib/weapp/transform/page-rewriter/template-rewriter/node.js:1:3419)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.