ui5-tooling: Minification failed with error

Expected Behavior

Build successful with minification

Current Behavior

Error Message: Minification failed with error: ‘return’ outside of function in file get-own-property-symbols.js (line 11, col 1, pos 255)

Steps to Reproduce the Issue

1.- name: ui5-task-minifier afterTask: minify configuration: html: true css: true json: true

Context

  • UI5 Module Version (output of ui5 --version when using the CLI): 3.6.0
  • Node.js Version: 18.14.2
  • npm Version: 9.5.2
  • OS/Platform: Windows 10
  • Browser (if relevant): Chrome

Log Output / Stack Trace

Error: Minification failed with error: ‘return’ outside of function in file get-own-property-symbols.js (line 11, col 1, pos 255) at AsyncFunction.execMinification (file:///home/user/projects/bre-v3/app/node_modules/@ui5/cli/node_modules/@ui5/builder/lib/processors/minifierWorker.js:63:9)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (8 by maintainers)

Commits related to this issue

Most upvoted comments

@flovogt I didn’t know this, before I executed ui5 build. I have created a nodejs module in webapp/ because I developed a small proxy as a part of localService/ (it contained sample data for JS-based MockServer). That’s why I decided to simply have my pet-proxy there. I know that it doesn’t sound right to have node_modules inside… otherwise, I wouldn’t help you with this bug 😄

@RandomByte thanks for the feature. The more verbose error is, the easier will it be to solve it.

The error handling will be better if it display me the file path and not just a file name.

@Vest thanks for the suggestion, we’ll fix this in one of the next releases via https://github.com/SAP/ui5-builder/pull/1102 👍

  1. Remove the ui5 section in the package.json - not needed any longer with UI5 Tooling v3
  2. I wonder if you need @sap/ui5-builder-webide-extension at all. Could please remove this dependency and also the tasks used in the ui5.yaml and see if the build works as expected