lcui-router-app icon indicating copy to clipboard operation
lcui-router-app copied to clipboard

出去折腾了一圈又回来了,还是不行unknown option '--mode'

Open fxqy opened this issue 5 years ago • 34 comments

又去duilib那折腾了一圈,还是需要装vcpkg,他那个更麻烦,又回来了,还是觉得lcui优雅。这次vs2015,vcpkg,lcpkg都装成功了,但是按照github readme上的还是不行,命令参数不对,希望帮我解决下。

PS D:\lcui-router-app> npm install
up to date in 1.501s

1 package is looking for funding
  run `npm fund` for details

PS D:\lcui-router-app> npm fund
[email protected]
`-- https://github.com/sponsors/sindresorhus
  `-- [email protected]

PS D:\lcui-router-app> lcpkg run start --mode debug
error: unknown option '--mode'
PS D:\lcui-router-app> cd ..\lcui-quick-start\
PS D:\lcui-quick-start> lcpkg run start --mode debug
error: unknown option '--mode'
PS D:\lcui-quick-start>

image

fxqy avatar Dec 16 '20 13:12 fxqy

你可以手动下载安装 vcpkg,然后给 lcpkg 配置 vcpkg 的目录路径。

https://github.com/lc-soft/lcpkg/blob/master/README.zh-cn.md#%E5%BF%AB%E9%80%9F%E4%B8%8A%E6%89%8B

image

lc-soft avatar Dec 16 '20 16:12 lc-soft

request 和 har-validator 过期只是警告,仍然可用,以后我会再花时间更新这些依赖。

lc-soft avatar Dec 16 '20 16:12 lc-soft

request 和 har-validator 过期只是警告,仍然可用,以后我会再花时间更新这些依赖。

虽然喜欢这个库,但能不能用mingw gcc来编译这个库啊,vs + vcpkg 太笨重了,我想装vs2019还不让装,不知道为啥,安装就是报错,只能安装vs2015,安装还附带了微软的全家桶sqlserver, .net, silverlight, web开发的,SSDT太多了。虽然库本身强调轻量级,但是开发环境太笨重了,普通人太难上手了,不用vs的开发者就别提了,微软的软件就是开源拦路虎。 image

fxqy avatar Dec 20 '20 03:12 fxqy

这是 lcpkg 的问题, lcpkg run 只是简单的执行脚本,不会把 --mode 参数带过去,之前改脚本的时候没做测试,也没更新文档。

image

start 脚本由这四个命令组成,你改用 npm 执行它们试试:

npm run configure -- --mode debug
npm run build:bin
npm run build:css
npm run run

其中 configurebuild:bin 脚本本质上就是调用 CMake 或 XMake。

lc-soft avatar Dec 20 '20 08:12 lc-soft

missing script: [object Object] 咋解?

zjh-nuc-AIOT avatar Dec 23 '20 10:12 zjh-nuc-AIOT

运行lcpkg run start就出现missing script: [object Object] ,咋解呢?

zjh-nuc-AIOT avatar Dec 23 '20 10:12 zjh-nuc-AIOT

运行lcpkg run start就出现missing script: [object Object] ,咋解呢?

临时解决方法:用 npm 代替 lcpkg ,我上面的评论已经解释过了。

lc-soft avatar Dec 25 '20 02:12 lc-soft

运行lcpkg run start就出现missing script: [object Object] ,咋解呢?

0.3.2 版本已经修复 missing script: [object Object] 问题了,你再重新安装试试。

npm install -g [email protected]

lc-soft avatar Dec 25 '20 04:12 lc-soft

构建配置已更新,要是还不行的话,你可以对比自己本地环境跑的脚本及输出的内容是否与 GitHub Actions 上的输出一致。

https://github.com/lc-ui/lcui-router-app/runs/1607474952?check_suite_focus=true

https://github.com/lc-ui/lcui-router-app/blob/71e79d4d03c2d63487cc615aae4bce7e62c8bf5c/.github/workflows/ccpp.yml#L5-L27

image

lc-soft avatar Dec 25 '20 04:12 lc-soft

[run] ERROR: the application is not working properly. npm ERR! code ELIFECYCLE npm ERR! errno 4294967295 npm ERR! [email protected] run: node ./scripts/run.js npm ERR! Exit status 4294967295 npm ERR! npm ERR! Failed at the [email protected] run script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\宏\AppData\Roaming\npm-cache_logs\2020-12-27T09_48_28_590Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 4294967295 npm ERR! [email protected] start: npm run configure && npm run build:bin && npm run build:css && npm run run npm ERR! Exit status 4294967295 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\宏\AppData\Roaming\npm-cache_logs\2020-12-27T09_48_28_646Z-debug.log 感觉就差一步了,话说必须需要vs2015的支持吗,安装了vs2019就不行吗

zjh-nuc-AIOT avatar Dec 27 '20 09:12 zjh-nuc-AIOT

[run] ERROR: the application is not working properly. child_process.js:674 throw err; ^

Error: Command failed: node ./scripts/run.js at checkExecSyncError (child_process.js:635:11) at execSync (child_process.js:671:15) at Command.runScript (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\src\run-script.js:15:3) at Command.listener [as _actionHandler] (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\node_modules\commander\index.js:426:31) at Command._parseCommand (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\node_modules\commander\index.js:1002:14) at Command.parse (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\node_modules\commander\index.js:801:10) at Object. (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\src\cli-run-script.js:7:4) at Module._compile (internal/modules/cjs/loader.js:1015:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10) at Module.load (internal/modules/cjs/loader.js:879:32) { status: 4294967295, signal: null, output: [ null, null, null ], pid: 10216, stdout: null, stderr: null } child_process.js:674 throw err; ^

Error: Command failed: lcpkg run configure && lcpkg run build:bin && lcpkg run build:css && lcpkg run run at checkExecSyncError (child_process.js:635:11) at execSync (child_process.js:671:15) at Command.runScript (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\src\run-script.js:15:3) at Command.listener [as _actionHandler] (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\node_modules\commander\index.js:426:31) at Command._parseCommand (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\node_modules\commander\index.js:1002:14) at Command.parse (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\node_modules\commander\index.js:801:10) at Object. (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\src\cli-run-script.js:7:4) at Module._compile (internal/modules/cjs/loader.js:1015:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10) at Module.load (internal/modules/cjs/loader.js:879:32) { status: 1, signal: null, output: [ null, null, null ], pid: 17580, stdout: null, stderr: null }

zjh-nuc-AIOT avatar Dec 27 '20 10:12 zjh-nuc-AIOT

@zhangjianhong111 进 app 目录,手动双击 app.exe 文件,看看报什么错,顺便再把 app 目录的文件列表截图发上来。

lc-soft avatar Dec 28 '20 02:12 lc-soft

@zhangjianhong111 我看你贴日志还是在跑 start 脚本,你按照我上面的评论跑这几个命令看看有什么输出。

image

lc-soft avatar Dec 28 '20 03:12 lc-soft

image

zjh-nuc-AIOT avatar Dec 28 '20 03:12 zjh-nuc-AIOT

Uploading image.png…

zjh-nuc-AIOT avatar Dec 28 '20 03:12 zjh-nuc-AIOT

@zhangjianhong111 app 目录的文件列表截图呢?

lc-soft avatar Dec 28 '20 03:12 lc-soft

image

zjh-nuc-AIOT avatar Dec 28 '20 03:12 zjh-nuc-AIOT

image

zjh-nuc-AIOT avatar Dec 28 '20 03:12 zjh-nuc-AIOT

@zhangjianhong111 脚本输出的内容就这么点吗?把前面跑的脚本的输出都贴出来。

[run]
ERROR: the application is not working properly.
child_process.js:674
throw err;

lc-soft avatar Dec 28 '20 03:12 lc-soft

[email protected] configure D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master node ./scripts/configure.js "--mode" "debug"

'xmake' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ���

[configure] 'xmake' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ��� write config to D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\config\builder.json: { mode: 'debug', arch: 'x64', tool: 'cmake' } -- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18363. -- Configuring done -- Generating done -- Build files have been written to: D:/baiduyunxiazai/qs/lcui-router-app-master (1)/lcui-router-app-master/build PS D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master> npm run build:bin

[email protected] build:bin D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master node ./scripts/build-bin.js

[build] 用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.4.0+e901037fe

Checking Build System AppLib.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\build\src\lib\Debug\AppLib.lib AppUI.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\build\src\ui\Debug\AppUI.lib about.c AppUIComponents.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\build\src\ui\components\Debug\AppUIComponents.lib AppUIViews.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\build\src\ui\views\Debug\AppUIViews.lib ui.c app.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\app\Debug\app.exe Building Custom Rule D:/baiduyunxiazai/qs/lcui-router-app-master (1)/lcui-router-app-master/CMakeLists.txt

[after build] exporting LCUI:x64-windows-release exporting lcui-router:x64-windows-release exporting lc-design:x64-windows-release PS D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master> npm run build:css

[email protected] build:css D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master node ./scripts/build-css.js

compile stylesheets... Rendering Complete, saving .css file... Wrote CSS to D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\app\assets\stylesheets\app.css PS D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master> npm run run

[email protected] run D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master node ./scripts/run.js

run application...

[run] ERROR: the application is not working properly. npm ERR! code ELIFECYCLE npm ERR! errno 4294967295 npm ERR! [email protected] run: node ./scripts/run.js npm ERR! Exit status 4294967295 npm ERR! npm ERR! Failed at the [email protected] run script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\宏\AppData\Roaming\npm-cache_logs\2020-12-28T03_37_08_968Z-debug.log PS D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master>

zjh-nuc-AIOT avatar Dec 28 '20 03:12 zjh-nuc-AIOT

麻烦了,最近学校在交课设,这不想用下这个

zjh-nuc-AIOT avatar Dec 28 '20 03:12 zjh-nuc-AIOT

PS D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master> npm start

[email protected] start D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master npm run configure && npm run build:bin && npm run build:css && npm run run

[email protected] configure D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master node ./scripts/configure.js

'xmake' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ���

[configure] 'xmake' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ��� write config to D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\config\builder.json: { mode: 'release', arch: 'x64', tool: 'cmake' } -- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18363. -- Configuring done -- Generating done -- Build files have been written to: D:/baiduyunxiazai/qs/lcui-router-app-master (1)/lcui-router-app-master/build

[email protected] build:bin D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master node ./scripts/build-bin.js

[build] 用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.4.0+e901037fe 版权所有(C) Microsoft Corporation。保留所有权利。

AppLib.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\build\src\lib\Debug\AppLib.lib AppUI.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\build\src\ui\Debug\AppUI.lib about.c AppUIComponents.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\build\src\ui\components\Debug\AppUIComponents.lib AppUIViews.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\build\src\ui\views\Debug\AppUIViews.lib ui.c app.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\app\Debug\app.exe

[after build] exporting LCUI:x64-windows-release exporting lcui-router:x64-windows-release exporting lc-design:x64-windows-release

[email protected] build:css D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master node ./scripts/build-css.js

compile stylesheets... Rendering Complete, saving .css file... Wrote CSS to D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\app\assets\stylesheets\app.css

[email protected] run D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master node ./scripts/run.js

run application...

[run] ERROR: the application is not working properly. npm ERR! code ELIFECYCLE npm ERR! errno 4294967295 npm ERR! [email protected] run: node ./scripts/run.js npm ERR! Exit status 4294967295 npm ERR! npm ERR! Failed at the [email protected] run script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\宏\AppData\Roaming\npm-cache_logs\2020-12-28T03_45_17_707Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 4294967295 npm ERR! [email protected] start: npm run configure && npm run build:bin && npm run build:css && npm run run npm ERR! Exit status 4294967295 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\宏\AppData\Roaming\npm-cache_logs\2020-12-28T03_45_17_765Z-debug.log PS D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master>

zjh-nuc-AIOT avatar Dec 28 '20 03:12 zjh-nuc-AIOT

我没装vs2015,有vs2019 我这些命令是在vscode下执行的

zjh-nuc-AIOT avatar Dec 28 '20 03:12 zjh-nuc-AIOT

@zhangjianhong111 我在 Windows 上跑了一次,已经知道问题了:

  • app.exe 没有输出在 app 目录里
  • 默认配置的是 release 模式,CMake 实际上还是以 debug 模式编译
  • lc-design 的资源目录多套了一层 app 目录,app/assets 变成了 app/app/assets

lc-soft avatar Dec 28 '20 05:12 lc-soft

我没装vs2015,有vs2019 我这些命令是在vscode下执行的

与 vs2015 无关,我 vs2017 都能编译通过。

lc-soft avatar Dec 28 '20 05:12 lc-soft

那要如何修改下呢?

zjh-nuc-AIOT avatar Dec 28 '20 07:12 zjh-nuc-AIOT

太麻烦你了

zjh-nuc-AIOT avatar Dec 28 '20 07:12 zjh-nuc-AIOT

大佬加油完善

zjh-nuc-AIOT avatar Dec 28 '20 08:12 zjh-nuc-AIOT

@zhangjianhong111 晚上我花点时间再改改。

lc-soft avatar Dec 28 '20 09:12 lc-soft

爱你,大佬。

zjh-nuc-AIOT avatar Dec 28 '20 13:12 zjh-nuc-AIOT