SAP / ui5-tooling

An open and modular toolchain to develop state of the art applications based on the UI5 framework
https://sap.github.io/ui5-tooling
Apache License 2.0
465 stars 70 forks source link

Build of Fiori Library Fails (Out of box template instance) - webIDE #285

Closed ShashankPincha closed 3 years ago

ShashankPincha commented 4 years ago

Expected Behavior

Build of a UI5 Application created using Fiori Library Template (w/ Sample Data) in webIDE should build without errors.

Current Behavior

Build failing for out of Template Fiori Library App.

Steps to reproduce the issue

  1. Create UI5 App using Fiori Library Template (w/ Sample Data) in webIDE
  2. Build
  3. Error

Context

Affected components (if known)

Main Error:

> Test@1.0.0 build /tmp/webide.ZmR.build/proj> ui5 build --include-task=generateManifestBundle generateCachebusterInfo 
1:08:12 PM (DIBuild) Error: Unsupported specification version 1.1 defined for project @openui5/sap.ui.core. See https://github.com/SAP/ui5-project/blob/master/docs/Configuration.md#specification-versions    at ProjectPreprocessor.isConfigValid (/tmp/webide.ZmR.build/proj/node_modules/@ui5/cli/node_modules/@ui5/project/lib/projectPreprocessor.js:271:10)    at Promise.all.projectsToProcess.map (/tmp/webide.ZmR.build/proj/node_modules/@ui5/cli/node_modules/@ui5/project/lib/projectPreprocessor.js:79:14)    at <anonymous>

Log Output / Stack Trace

1:07:00 PM (Build) Build started.
1:07:03 PM (DIBuild) Build of "/Test" in progress.
1:07:03 PM (DIBuild) [INFO] Retrieving source code[INFO] Preparing node environment
1:07:05 PM (DIBuild) [INFO] Node environment ready
1:07:09 PM (DIBuild) [INFO] Installing node dependencies
1:07:11 PM (DIBuild) npm WARN deprecated coffee-script@1.10.0: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
1:07:14 PM (DIBuild) npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
1:07:20 PM (DIBuild) npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
1:07:35 PM (DIBuild) npm WARN notice [SECURITY] mixin-deep has the following vulnerability: 1 high. Go here for more details: https://www.npmjs.com/advisories?search=mixin-deep&version=1.3.1 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.npm WARN notice [SECURITY] lodash.merge has the following vulnerability: 1 high. Go here for more details: https://www.npmjs.com/advisories?search=lodash.merge&version=4.6.1 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
1:07:37 PM (DIBuild) npm WARN notice [SECURITY] marked has the following vulnerability: 1 low. Go here for more details: https://www.npmjs.com/advisories?search=marked&version=0.6.2 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
1:07:59 PM (DIBuild) > core-js@2.6.9 postinstall /tmp/webide.ZmR.build/proj/node_modules/@ui5/cli/node_modules/core-js> node scripts/postinstall || echo "ignore"
1:08:01 PM (DIBuild) Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
1:08:03 PM (DIBuild) npm notice created a lockfile as package-lock.json. You should commit this file.npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.7 (node_modules/@ui5/cli/node_modules/fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})added 1189 packages from 983 contributors in 52.767s[INFO] Installing node dependencies operation succeeded[INFO] Set grunt
1:08:05 PM (DIBuild) > Test@1.0.0 clean /tmp/webide.ZmR.build/proj> rm -rf dist
1:08:07 PM (DIBuild) basevalidator attribute for xml in the project.json file is: fioriXmlAnalysisbasevalidator attribute for js in the project.json file is: fioriJsValidator
1:08:10 PM (DIBuild) > Test@1.0.0 build-for-deploy /tmp/webide.ZmR.build/proj> npm run build && npm run flatten && npm run clean-after-flatten> Test@1.0.0 build /tmp/webide.ZmR.build/proj> ui5 build --include-task=generateManifestBundle generateCachebusterInfo 
1:08:12 PM (DIBuild) Error: Unsupported specification version 1.1 defined for project @openui5/sap.ui.core. See https://github.com/SAP/ui5-project/blob/master/docs/Configuration.md#specification-versions    at ProjectPreprocessor.isConfigValid (/tmp/webide.ZmR.build/proj/node_modules/@ui5/cli/node_modules/@ui5/project/lib/projectPreprocessor.js:271:10)    at Promise.all.projectsToProcess.map (/tmp/webide.ZmR.build/proj/node_modules/@ui5/cli/node_modules/@ui5/project/lib/projectPreprocessor.js:79:14)    at <anonymous>npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! Test@1.0.0 build: `ui5 build --include-task=generateManifestBundle generateCachebusterInfo `npm ERR! Exit status 1npm ERR! npm ERR! Failed at the Test@1.0.0 build script.npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in:npm ERR!     /mnt/npm_cache/_logs/2020-02-26T09_08_11_065Z-debug.lognpm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! Test@1.0.0 build-for-deploy: `npm run build && npm run flatten && npm run clean-after-flatten`npm ERR! Exit status 1npm ERR! npm ERR! Failed at the Test@1.0.0 build-for-deploy script.npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in:npm ERR!     /mnt/npm_cache/_logs/2020-02-26T09_08_11_123Z-debug.log
1:08:14 PM (DIBuild) Build failed.Please follow the relevant troubleshooting tips below:ERROR: "Unable to find local grunt"- Right-click the project folder, select "Clean npm Folder", and build again.ERROR: "npm ERR! code EINTERGITY"- Delete the "package-lock.json" file from the project and build again.[INFO] Build finished in 71 seconds
ShashankPincha commented 4 years ago

Upon checking out: https://sap.github.io/ui5-tooling/pages/Configuration/#specification-versions

Version UI5 CLI Release
0.1 v0.0.1+
1.0 v1.0.0+
1.1 v1.13.0+

My UI5.yaml has:

specVersion: '1.0'
metadata:
  name: "Test"
type: library

So not sure why ui5-cli is taking '1.1' as seen in the error.

ShashankPincha commented 4 years ago

I've created a Issue for this in ui5-builder also, https://github.com/SAP/ui5-builder/issues/421

RandomByte commented 4 years ago

Unsupported specification version 1.1 defined for project @openui5/sap.ui.core

This means that the specVersion property defined in the ui5.yaml of the sap.ui.core project was upgraded to 1.1.

Since version 1.75.0, all OpenUI5 projects use specification version 1.1 in order to use the new theme-library type.

In your package.json, please update your UI5 CLI version to 1.13.0 or higher in order to use OpenUI5 libraries in versions 1.75.0 and above.

RandomByte commented 4 years ago

Change "@ui5/cli": "1.5.3", to "@ui5/cli": "1.14.0",. Then right click on your project, "build" -> "Clean npm Folder". Then try building your project again.

ShashankPincha commented 4 years ago

@RandomByte Sorry about the erratic comment deletions 😅

I didn't read your comment correctly, I've updated the package.json version as you recommended, it's working fine.

Appreciate your help. Not sure how it works, but if you can advice the webIDE team to update the template's package.json so others don't face this, that'll be great.

Good day.

RandomByte commented 4 years ago

but if you can advice the webIDE team to update the template's package.json so others don't face this, that'll be great

Already done, they are working on it 👍