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 --versionwhen 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
- [FIX] minify: In case of error, include full resource path in the error messsage As suggested by Vest in https://github.com/SAP/ui5-tooling/issues/890#issuecomment-2580779768 — committed to SAP/ui5-builder by RandomByte 2 years ago
- [FIX] minify: In case of error, include full resource path in the error messsage As suggested by Vest in https://github.com/SAP/ui5-tooling/issues/890#issuecomment-2580779768 This should make it eas... — committed to SAP/ui5-builder by RandomByte 2 years ago
- [FIX] minify: In case of error, include full resource path in the error messsage As suggested by Vest in https://github.com/SAP/ui5-tooling/issues/890#issuecomment-2580779768 This should make it eas... — committed to SAP/ui5-builder by RandomByte 2 years ago
@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.
@Vest thanks for the suggestion, we’ll fix this in one of the next releases via https://github.com/SAP/ui5-builder/pull/1102 👍
ui5section in the package.json - not needed any longer with UI5 Tooling v3@sap/ui5-builder-webide-extensionat all. Could please remove this dependency and also the tasks used in the ui5.yaml and see if the build works as expected