0

Using cli to deploy the application. I've used several versions of nodes, operating systems, command lines: both shell and terminal but this error persists. I've already uploaded and downloaded the @ui5/cli version, at the moment I'm debugging inside the lib to see if I can find a light.

ui5/cli version 2.14.12

node version v16.17.1

ui5-azure-devops.yaml

specVersion: '2.2'
metadata:
  name: "ts.ui5"
resources:
  configuration:
    propertiesFileSourceEncoding: UTF-8
type: library
builder:
  customTasks:
    - name: deploy-to-abap
      afterTask: uglify
      configuration:        
        target:
          url: env:UI5_HOST
          client: env:UI5_CLIENT
          auth: basic
        credentials:
          username: env:UI5_USERNAME
          password: env:UI5_PASSWORD
        app:
          name: /SPROTS/LIBUI5
          package: /SPROTS/TS_FIORI
          transport: env:UI5_REQUEST

package.json

{
    "name": "ts.ui5",
    "version": "1.0.0",
    "private": true,
    "devDependencies": {
        "@sap/di.code-validation.js": "1.1.6",
        "@sap/di.code-validation.xml": "1.1.16",
        "@sap/ux-ui5-tooling": "^1.6.7",
        "@ui5/builder": "^2.11.6",
        "@ui5/fs": "^2.0.6",
        "@ui5/logger": "^2.0.1",
        "bower": "^1.8.0",
        "grunt": "1.0.1",
        "grunt-contrib-clean": "^1.0.0",
        "grunt-contrib-connect": "^1.0.2",
        "grunt-contrib-copy": "^1.0.0",
        "grunt-eslint": "^20.0.0",
        "grunt-karma": "^1.0.0",
        "grunt-openui5": "^0.12.0",
        "grunt-run": "0.8.1",
        "karma": "^6.3.4",
        "karma-chrome-launcher": "^3.1.0",
        "karma-cli": "^2.0.0",
        "karma-coverage": "^2.0.3",
        "karma-jasmine": "^4.0.1",
        "karma-junit-reporter": "^2.0.1",
        "karma-openui5": "~0.2.3",
        "karma-phantomjs-launcher": "^1.0.4",
        "karma-qunit": "^1.2.1",
        "karma-sinon": "^1.0.5",
        "karma-ui5": "^2.3.4",
        "puppeteer": "^10.2.0",
        "qunit": "^2.16.0",
        "qunitjs": "^2.0.0",
        "rimraf": "3.0.2",
        "ui5-middleware-code-coverage": "^2.0.3",
        "ui5-middleware-livereload": "^0.5.1",
        "ui5-task-zipper": "^0.5.1"
    },
    "main": "Gruntfile.js",
    "scripts": {
        "clean": "rm -rf dist",
        "build": "rimraf dist && ui5 build -a --include-task=generateManifestBundle generateCachebusterInfo",
        "build-for-deploy": "npm run build && npm run flatten && npm run clean-after-flatten",
        "flatten": "cp -r dist/resources/com/sprots/libui5/* dist && cp dist/resources/com/sprots/libui5/.library dist && cp dist/resources/.Ui5RepositoryTextFiles dist",
        "clean-after-flatten": "rm -rf dist/resources dist/test-resources",
        "testsuite": "ui5 serve --open test-resources/qunit/testsuite.qunit.html",
        "deploy-azure-devops": "ui5 build --config ui5-azure-devops.yaml -- -y --verbose",
        "test": "karma start",
        "unit-tests": "fiori run --open test/unit/unitTests.qunit.html",
        "int-tests": "fiori run --open test/integration/opaTests.qunit.html"
    },
    "ui5": {
        "dependencies": [
            "ui5-middleware-livereload",
            "ui5-middleware-code-coverage",
            "@sap/ux-ui5-tooling",
            "ui5-task-zipper"
        ]
    },
    "license": "UNLICENSED",
    "dependencies": {
        "@openui5/sap.ui.core": "1.60.*",
        "@openui5/themelib_sap_belize": "1.60.*",
        "@sap/ux-specification": "^1.102.4"
    }
}

command: npm run deploy-azure-devops

error:

2.3896516Z verb resources:adapters:Memory Writing to virtual path /resources/com/ts/libui5/controls/Price.js
2022-10-19T01:28:42.3900887Z verb resources:adapters:Memory Writing to virtual path /resources/com/ts/libui5/controls/Util.js
2022-10-19T01:28:42.3908566Z verb resources:adapters:Memory Writing to virtual path /resources/com/ts/libui5/controls/Payments.js
2022-10-19T01:28:42.3912429Z verb resources:adapters:Memory Writing to virtual path /resources/com/ts/libui5/controls/FreeChars.js
2022-10-19T01:28:42.3915881Z verb resources:adapters:Memory Writing to virtual path /resources/com/ts/libui5/controls/Decimals.js
2022-10-19T01:28:42.3919245Z verb resources:adapters:Memory Writing to virtual path /resources/com/ts/libui5/library.js
2022-10-19T01:28:42.3924201Z info builder:builder library ts.ui5  (10/10) Running task deploy-to-abap...
2022-10-19T01:28:42.3931619Z ERR! builder:builder Build failed in 710 ms
2022-10-19T01:28:42.3937076Z info builder:builder Executing cleanup tasks...
2022-10-19T01:28:42.3973034Z 
2022-10-19T01:28:42.3978473Z ⚠️  Process Failed With Error
2022-10-19T01:28:42.3978901Z 
2022-10-19T01:28:42.3981344Z Error Message:
2022-10-19T01:28:42.3982236Z task is not a function
2022-10-19T01:28:42.3982345Z 
2022-10-19T01:28:42.3982552Z Stack Trace:
2022-10-19T01:28:42.3986007Z TypeError: task is not a function
2022-10-19T01:28:42.3986429Z     at execTask (/opt/hostedtoolcache/node/16.17.1/x64/lib/node_modules/@ui5/cli/node_modules/@ui5/builder/lib/types/AbstractBuilder.js:140:12)
2022-10-19T01:28:42.3987013Z     at /opt/hostedtoolcache/node/16.17.1/x64/lib/node_modules/@ui5/cli/node_modules/@ui5/builder/lib/types/AbstractBuilder.js:242:11
2022-10-19T01:28:42.3987547Z     at async Object.build (/opt/hostedtoolcache/node/16.17.1/x64/lib/node_modules/@ui5/cli/node_modules/@ui5/builder/lib/builder/builder.js:404:4)
2022-10-19T01:28:42.3988105Z     at async Object.handleBuild [as handler] (/opt/hostedtoolcache/node/16.17.1/x64/lib/node_modules/@ui5/cli/lib/cli/commands/build.js:153:2)
2022-10-19T01:28:42.3988810Z 
2022-10-19T01:28:42.3989614Z If you think this is an issue of the UI5 Tooling, you might report it using the following URL: https://github.com/SAP/ui5-tooling/issues/new/choose
2022-10-19T01:28:42.4315991Z ##[error]Bash exited with code '1'.
Philipp
  • 67,764
  • 9
  • 118
  • 153

2 Answers2

1

This seems to be a regression in @sap/ux-ui5-tooling version 1.7.6. Try downgrading to the previous version:

npm install --save-dev @sap/ux-ui5-tooling@1.7.5
RandomByte
  • 57
  • 9
0

Really strange as I'm able to generate a new app using 1.7.6 and deploy to an ABAP backend using npm run deploy.

Wondering if you can edit your package.json and change @sap/ux-ui5-tooling from ^1.6.7 to ^1.7.6 please?

If possible, can you delete package-lock.json and node_modules and do a fresh install using npm i to consume the latest of everything.

John

user1859465
  • 883
  • 1
  • 11
  • 28