This repository has been archived by the owner on Jan 5, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
sap-cloud-sdk package
was failing on some windows machines. This uses the--force
flag to fix the issue.Further comments
There is an alternative solution: change the
name
property in the<projectDir>/package.json
before runningnpm install
in theoutputDir
and changing it back afterwards. This might create unwanted changes (JSON.stringify()
creating a different order, command crashing and the restore not working, ...) which can be hard to test for thoroughly. But this alternative avoids the side-effects of--force
(always loading from the registry instead of using the npm cache, ...).I decided to use
--force
as it seemed more robust and should only rarely affect users. Package is not a common command for developers (only necessary for a deploy). CI/CD will be running on Linux in most cases and therefore run without--force
. My assumption is that most deployments are done by CI/CD pipeline and therefore this will have a negligible impact.