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

npmExecuteScripts fails with ENOWORKSPACES #4929

Closed
navinkrishnan opened this issue May 15, 2024 · 7 comments
Closed

npmExecuteScripts fails with ENOWORKSPACES #4929

navinkrishnan opened this issue May 15, 2024 · 7 comments
Labels
stale marks stale issues and pull requests

Comments

@navinkrishnan
Copy link

Hi,
In the project package.json, I have configured workspaces

 "workspaces": [
    "app/*"
  ]

In the pipeline config, I have the following for npmExecuteScripts

  npmExecuteScripts: 
    install: true
    publish: false
    runScripts: 
      - "production-build"

This results in the error:

info  npmExecuteScripts - Discovered package.json file package.json
12:14:56  info  npmExecuteScripts - running command: npm config get registry
12:14:56  error npmExecuteScripts - npm ERR! code ENOWORKSPACES
12:14:56  error npmExecuteScripts - npm ERR! This command does not support workspaces.
12:14:56  info  npmExecuteScripts - 
12:14:56  error npmExecuteScripts - npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-05-15T06_44_55_325Z-debug-0.log
@anilkeshav27
Copy link
Member

the npm build does not support workspaces currently

@navinkrishnan
Copy link
Author

Hi @anilkeshav27 , how do we handle project with workspaces. The above error is not for the script I wanted to run, but rather npmExecuteScripts automatically runs the command npm config get registry and it fails.

@js1972
Copy link

js1972 commented Jul 8, 2024

This is bad news. The best practice that is developing for CAP/UI5 apps is to use npm workspaces as it allows the CAP tooling to work alongside the UI5 tooling. And now our CICD service can't handle it. Is there a workaround to this?

@anilkeshav27
Copy link
Member

This is bad news. The best practice that is developing for CAP/UI5 apps is to use npm workspaces as it allows the CAP tooling to work alongside the UI5 tooling. And now our CICD service can't handle it. Is there a workaround to this?

could you point me to some documentation about the CAP apps to use npm workspaces, since we lack this functionality some pointers about best practises is a good place to try a bring in workspaces support in piper

@anilkeshav27
Copy link
Member

Hi @anilkeshav27 , how do we handle project with workspaces. The above error is not for the script I wanted to run, but rather npmExecuteScripts automatically runs the command npm config get registry and it fails.

npm commands to set/get registry is baked into the npm steps themselves to fetch from cached npm registry and not npmjs.
my guess is that when we try to run the first npm command it fails when it encounters WORKSPACES in the package.json

Copy link
Contributor

Thank you for your contribution! This issue is stale because it has been open 60 days with no activity. In order to keep it open, please remove stale label or add a comment within the next 10 days. If you need a Piper team member to remove the stale label make sure to add @SAP/jenkins-library-team to your comment.

@github-actions github-actions bot added the stale marks stale issues and pull requests label Sep 21, 2024
Copy link
Contributor

github-actions bot commented Oct 1, 2024

Issue got stale and no further activity happened. It has automatically been closed. Please re-open in case you still consider it relevant.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale marks stale issues and pull requests
Projects
None yet
Development

No branches or pull requests

3 participants