thx / rap2-delos

阿里妈妈前端团队出品的开源接口管理工具RAP第二代
http://rap2.taobao.org
MIT License
7.65k stars 1.35k forks source link

npm build failed #790

Closed maxianwei closed 3 years ago

maxianwei commented 3 years ago

BUG描述 npm buid的时候报错如下: 9 verbose lifecycle rap2-delos@2.9.0~build: CWD: /data/.jenkins/workspace/sls-developer-platform-service-test 10 silly lifecycle rap2-delos@2.9.0~build: Args: [ '-c', 'rimraf -rf dist/ && tsc' ] 11 silly lifecycle rap2-delos@2.9.0~build: Returned: code: 2 signal: null 12 info lifecycle rap2-delos@2.9.0~build: Failed to exec build script 13 verbose stack Error: rap2-delos@2.9.0 build: rimraf -rf dist/ && tsc 13 verbose stack Exit status 2 13 verbose stack at EventEmitter. (/root/.nvm/v10.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16) 13 verbose stack at EventEmitter.emit (events.js:198:13) 13 verbose stack at ChildProcess. (/root/.nvm/v10.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:198:13) 13 verbose stack at maybeClose (internal/child_process.js:982:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) 14 verbose pkgid rap2-delos@2.9.0 15 verbose cwd /data/.jenkins/workspace/sls-developer-platform-service-test 16 verbose Linux 3.10.0-957.21.3.el7.x86_64 17 verbose argv "/root/.nvm/v10.16.0/bin/node" "/root/.nvm/v10.16.0/bin/npm" "run" "build" 18 verbose node v10.16.0 19 verbose npm v6.9.0 20 error code ELIFECYCLE 21 error errno 2 22 error rap2-delos@2.9.0 build: rimraf -rf dist/ && tsc 22 error Exit status 2 23 error Failed at the rap2-delos@2.9.0 build script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 2, true ]

** jenkins 步骤 sh 'cd /data/.jenkins/workspace/sls-developer-platform-service-test && npm install --unsafe-perm --registry=https://registry.npm.taobao.org' sh 'cd /data/.jenkins/workspace/sls-developer-platform-service-test && npm run build'

期望结果 image

实际结果 image

环境

maxianwei commented 3 years ago

我看到https://github.com/thx/rap2-delos/issues/439 这个issue里面提到打开 tsconfig.json 文件,找到 noImplicitAny,改为 false,但是我的此项配置就是false image

Bosn commented 3 years ago

应该是TypeScript版本的问题,用最新版master再试一下