Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with "Could not create Module: Parameter 'modulePath' must contain an absolute path" #796

Closed
NikoletaBogdanova opened this issue Mar 2, 2023 · 5 comments · Fixed by SAP/ui5-project#588
Assignees
Labels
bug Something isn't working

Comments

@NikoletaBogdanova
Copy link

Jenkins build of UI5 app began failing since releasing ui5-project 3.0.3 version on 01.03.2023 on step
ui5 build --config=uimodule/ui5.yaml --clean-dest --dest uimodule/dist --include-task=generateManifestBundle --clean-dest --verbose"

I suppose this change is causing the error SAP/ui5-project@f36b50e

[2023-03-02T14:59:10.555Z] verb graph:helpers:ui5Framework SAPUI5 dependencies sap.ui.core, sap.m, sap.ui.layout, sap.f resolved in 5.08 ms
[2023-03-02T14:59:10.555Z] verb graph:helpers:ui5Framework Creating project for library sap.ui.core...
[2023-03-02T14:59:10.555Z] verb graph:helpers:ui5Framework Creating project for library sap.m...
[2023-03-02T14:59:10.555Z] verb graph:helpers:ui5Framework Creating project for library sap.ui.layout...
[2023-03-02T14:59:10.555Z] verb graph:helpers:ui5Framework Creating project for library sap.ui.unified...
[2023-03-02T14:59:10.555Z] verb graph:helpers:ui5Framework Creating project for library sap.f...
[2023-03-02T14:59:10.555Z] ⚠️  Process Failed With Error
[2023-03-02T14:59:10.555Z] 
[2023-03-02T14:59:10.555Z] Error Message:
[2023-03-02T14:59:10.555Z] Could not create Module: Parameter 'modulePath' must contain an absolute path
[2023-03-02T14:59:10.555Z] 
[2023-03-02T14:59:10.555Z] Stack Trace:
[2023-03-02T14:59:10.555Z] Error: Could not create Module: Parameter 'modulePath' must contain an absolute path
[2023-03-02T14:59:10.555Z]     at new Module (file:///home/jenkins/tech-docs-ui/tech-docs-ui/node_modules/@ui5/cli/node_modules/@ui5/project/lib/graph/Module.js:55:10)
[2023-03-02T14:59:10.555Z]     at ProjectProcessor._addProjectToGraph (file:///home/jenkins/tech-docs-ui/tech-docs-ui/node_modules/@ui5/cli/node_modules/@ui5/project/lib/graph/helpers/ui5Framework.js:68:16)
[2023-03-02T14:59:10.556Z] 
[2023-03-02T14:59:10.556Z] 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
[2023-03-02T14:59:10.556Z] ERROR: "build:uimodule" exited with 1.

On my local machine the build is just fine. The -verbose option does not print which module is not defined with absolute path

part of ui5.yaml

specVersion: "2.2"
metadata:
  name: techdocs_uimodule
type: application
resources:
  configuration:
    paths:
      webapp: uimodule/webapp
framework:
  name: SAPUI5
  version: 1.108.5
  libraries:
    - name: sap.ui.core
    - name: sap.m
    - name: sap.ui.layout
    - name: sap.f
    - name: themelib_sap_fiori_3

dev dependencies in package.json

"devDependencies": {
    "@ui5/cli": "3.0.2",
    "csstree-validator": "3.0.0",
    "eslint": "8.34.0",
    "karma": "6.4.1",
    "karma-chrome-launcher": "3.1.1",
    "karma-coverage": "2.2.0",
    "karma-ui5": "3.0.0",
    "npm-run-all": "4.1.5",
    "prettier": "2.8.4",
    "shx": "0.3.4",
    "ui5-middleware-livereload": "0.7.2",
    "ui5-task-cachebuster-indexing": "1.0.2"
  },

What should we do to fix the Jenkins build?

@NikoletaBogdanova NikoletaBogdanova added bug Something isn't working needs triage Needs to be investigated and confirmed as a valid issue that is not a duplicate labels Mar 2, 2023
@matz3
Copy link
Member

matz3 commented Mar 2, 2023

First of all, please commit the lockfile, e.g. package-lock.json (see https://docs.npmjs.com/cli/v9/configuring-npm/package-lock-json) to your repository in order to have reproducible builds in CI.

The mentioned change was already part of the initial 3.0.0 release, so I wonder whether it is indeed the root cause.

With the information provided I'm unable to reproduce the mentioned issue.
Please either provide a small, public example project to demonstrate the issue, or as you seem to be an employee, send me the project details via e-mail.

@matz3 matz3 added the information required Further information is required label Mar 2, 2023
@NikoletaBogdanova
Copy link
Author

NikoletaBogdanova commented Mar 6, 2023

Hi, I've committed the package-lock.json file in the repo but the result is the same. On my local machine (Mac) the build passes successfully and it fails on the Jenkins (Alpine image). We reverted the version of "@ui5/cli": "2.14.17" in the master not to block the work. I will send you an email with the details.

@d3xter666
Copy link
Contributor

Hi @NikoletaBogdanova ,

We've prepared a fix for the issue: SAP/ui5-project#588
Please track the progress in the Pull Request

Cheers

@flovogt flovogt removed information required Further information is required needs triage Needs to be investigated and confirmed as a valid issue that is not a duplicate labels Mar 7, 2023
@d3xter666
Copy link
Contributor

Reopening the issue, because we haven't made a patch release yet

@d3xter666 d3xter666 reopened this Mar 10, 2023
@d3xter666
Copy link
Contributor

Hi @NikoletaBogdanova ,

You could find the fix in ui5-project@3.04: SAP/ui5-project@2d174fc

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants