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

Remove force-resolutions dependency and preinstall script #1166

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

carterworks
Copy link
Contributor

Description

Alloy has a preinstall script that runs before any project (including the alloy sandbox and the alloy Tags extension) installs alloy's dependencies when it includes alloy as a dependency. The preinstall script runs force-resolutions which "This package modifies package-lock.json to force the installation of specified versions of a set of transitive dependencies (dependencies of dependencies).". It was added back in January as an attempt to fix Saucelab errors around Firefox install.

But, for some reason, that package crashes on some machines. I've run it in three environments (Mac, Windows, Ubuntu) and it breaks on Mac.

The error

npm error code 254
npm error path /Users/cmcbride/homebase/code/github.com/adobe/reactor-extension-alloy/node_modules/@adobe/alloy
npm error command failed
npm error command sh -c npx force-resolutions
npm error npm error code ENOENT
npm error npm error syscall lstat
npm error npm error path /private/var/folders/ls/b81s61dd4sj936v7c5gmf_yw0000gq/T/tmp.3Bdu0jwtwy
npm error npm error errno -2
npm error npm error enoent ENOENT: no such file or directory, lstat '/private/var/folders/ls/b81s61dd4sj936v7c5gmf_yw0000gq/T/tmp.3Bdu0jwtwy'
npm error npm error enoent This is related to npm not being able to find a file.
npm error npm error enoent
npm error
npm error npm error A complete log of this run can be found in: /Users/cmcbride/.npm/_logs/2024-08-20T16_38_43_202Z-debug-0.log

npm error A complete log of this run can be found in: /Users/cmcbride/.npm/_logs/2024-08-20T16_38_26_972Z-debug-0.log

This prevents the dependency installation from completing (unless you run npm install --ignore-scripts.

@shammowla says that it isn't necessary since we have changed the version of the Saucelabs util that we are running, so let's remove it.

Related Issue

Motivation and Context

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change which does not add functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA or I'm an Adobe employee.
  • I have made any necessary test changes and all tests pass.
  • I have run the Sandbox successfully.

@carterworks carterworks added the ignore-for-release Do not include this PR in release notes label Aug 20, 2024
@carterworks carterworks self-assigned this Aug 20, 2024
@carterworks
Copy link
Contributor Author

I will merge this after the release.

@carterworks carterworks merged commit 33ddbfd into main Aug 22, 2024
3 checks passed
@carterworks carterworks deleted the remove-force-resolutions branch August 22, 2024 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore-for-release Do not include this PR in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants