系统配置按钮无响应
本帖最后由 Harrix 于 2023-6-13 17:20 编辑大约一周前的github上的master分支
自己build到linux x86 64环境下运行
其他功能都好但是系统配置按钮点下后无效
浏览器给的异常是x_component_systemconfig/Main.min.js?v=o2oa 无法找到
我也比对过已经编译好的版本
发现自己编译的版本x_component_systemconfig这个路径下是空的
考虑到这个路径下都是脚本和样式
所以是不是build过程中相关配置没设置正确
=====================================================
自问自答
原因是nodejs 17 以上版本会和webpack冲突
导致部分模块无法打包,其中包括systemconfig也就是系统配置模块
参考:github.com
可以考虑nodejs降级至16版本,或等o2oa开发者解决
补充
我重新看了一下编译log
相关的地方如下:
Node.js v18.16.0
exec npm install && npm run o2-build { cwd: 'D:\\o2oa-master\\o2web\\source\\x_component_systemconfig' }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@achrinza/node-ipc@9.2.2',
npm WARN EBADENGINE required: { node: '8 || 10 || 12 || 14 || 16 || 17' },
npm WARN EBADENGINE current: { node: 'v18.16.0', npm: '9.5.1' }
npm WARN EBADENGINE }
up to date, audited 1168 packages in 2s
110 packages are looking for funding
run `npm fund` for details
27 vulnerabilities (1 low, 3 moderate, 18 high, 5 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
> x_component_systemconfig@0.1.0 o2-build
> vue-cli-service build --dest ../../../target/o2server/servers/webServer/x_component_systemconfig
-Building for production...
node:internal/crypto/hash:71
this = new _Hash(algorithm, xofLen);
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at module.exports (D:\o2oa-master\o2web\source\x_component_systemconfig\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (D:\o2oa-master\o2web\source\x_component_systemconfig\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (D:\o2oa-master\o2web\source\x_component_systemconfig\node_modules\webpack\lib\NormalModule.js:471:10)
at D:\o2oa-master\o2web\source\x_component_systemconfig\node_modules\webpack\lib\NormalModule.js:503:5
at D:\o2oa-master\o2web\source\x_component_systemconfig\node_modules\webpack\lib\NormalModule.js:358:12
at D:\o2oa-master\o2web\source\x_component_systemconfig\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (D:\o2oa-master\o2web\source\x_component_systemconfig\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at Array.<anonymous> (D:\o2oa-master\o2web\source\x_component_systemconfig\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
at Storage.finished (D:\o2oa-master\o2web\source\x_component_systemconfig\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
at D:\o2oa-master\o2web\source\x_component_systemconfig\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
at D:\o2oa-master\o2web\source\x_component_systemconfig\node_modules\graceful-fs\graceful-fs.js:123:16
at FSReqCallback.readFileAfterClose (node:internal/fs/read_file_context:68:3) {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
具体情况还不清楚,
推测应该是nodejs版本有冲突
望技术人员关注一下 这个应该是依赖包冲突的问题,你可以按以下方式处理:
1、进入源码o2web/source/x_component_systemconfig,运行:npm install, 然后根据运行 npm audit fix --force;或者升级 @vue/compiler-sfc、vue两个包。
2、然后运行 npm run o2-deploy
3、运行完成后会在o2web/dest目录下生成x_component_systemconfig,将其中的文件拷贝到服务器中。
我们也会在打包脚本中处理此问题,谢谢关注!
页:
[1]