[Bug?]: How to ignore engines on github dependencies
Self-service
- [ ] I'd be willing to implement a fix
Describe the bug
When installing a package with github dependencies. Yarn pack throws an error because there's an engine version mismatched. Is there a way to ignore it?
Packing seaport-js@https://github.com/ProjectOpenSea/seaport-js.git#commit=1f285ec3594446f5fb1754bed0bd056037b812fd from sources
Using Yarn Classic for bootstrap. Reason: "__metadata" key not found in yarn.lock, must be a Yarn classic lockfile
Resolving classic to a url...
Downloading https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-1.22.19.js...
Saving it into /private/var/folders/yq/1pglppcn7vx4ts3p2s9fh4x80000gn/T/xfs-62833e06/.yarn/releases/yarn-1.22.19.cjs...
Updating /private/var/folders/yq/1pglppcn7vx4ts3p2s9fh4x80000gn/T/xfs-62833e06/.yarnrc...
Done!
yarn install v1.22.19
[1/5] Validating package.json...
error [email protected]: The engine "node" is incompatible with this module. Expected version "16.11.0". Got "17.9.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
To reproduce
Create a new repository and run yarn init -2
yarn add opensea-js@beta
Environment
System:
OS: macOS 12.2
CPU: (10) arm64 Apple M1 Pro
Binaries:
Node: 17.9.0 - /private/var/folders/yq/1pglppcn7vx4ts3p2s9fh4x80000gn/T/xfs-775e8e7a/node
Yarn: 3.2.1 - /private/var/folders/yq/1pglppcn7vx4ts3p2s9fh4x80000gn/T/xfs-775e8e7a/yarn
npm: 8.5.5 - ~/.nvm/versions/node/v17.9.0/bin/npm
Additional context
No response
And if I were to downgrade to 16.11.0 using nvm use v16.11.0, I get this cryptic error instead.
Packing seaport-js@https://github.com/ProjectOpenSea/seaport-js.git#commit=1f285ec3594446f5fb1754bed0bd056037b812fd from sources
Using Yarn Classic for bootstrap. Reason: "__metadata" key not found in yarn.lock, must be a Yarn classic lockfile
Resolving classic to a url...
error An unexpected error occurred: "Release not found: classic".
info If you think this is a bug, please open a bug report with the information provided in "/private/var/folders/yq/1pglppcn7vx4ts3p2s9fh4x80000gn/T/xfs-c389103c/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/policies for documentation about this command.
Hi! 👋
This issue looks stale, and doesn't feature the reproducible label - which implies that you didn't provide a working reproduction using Sherlock. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it or you edit your first post to include a formal reproduction (you can use the playground for that).
Note that we require Sherlock reproductions for long-lived issues (rather than standalone git repositories or similar) because we're a small team. Sherlock gives us the ability to check which bugs are still affecting the master branch at any given point, and decreases the amount of code we need to run on our own machines (thus leading to faster bug resolutions). It helps us help you! 😃
If you absolutely cannot reproduce a bug on Sherlock (for example because it's a Windows-only issue), a maintainer will have to manually add the upholded label. Thanks for helping us triaging our repository! 🌟
I am using yarn4 with nodeLinker node_modules. When I am using react-select version in package.json, modern yarn works fine "react-select": "5.7.7", But when I changed it to "react-select": "git+https://github.com/MindTickle/mt-react-select.git#main", On running yarn, getting below error,
Packing react-select@https://github.com/MindTickle/mt-react-select.git#commit=b56cbdba8fd6636bb17609e61583cb26ac409905 from sources Using Yarn Classic for bootstrap. Reason: "__metadata" key not found in yarn.lock, must be a Yarn classic lockfile
➤ YN0000: Downloading https://classic.yarnpkg.com/latest.js ➤ YN0000: Saving the new release in .yarn/releases/yarn-classic.cjs ➤ YN0000: Done in 4s 137ms
yarn install v1.22.19 [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... error /private/var/folders/j3/zvjj264s4jj1gn1041x68tmr0000gn/T/xfs-bc79575b/node_modules/iltorb: Command failed. Exit code: 1 Command: node ./scripts/install.js || node-gyp rebuild Arguments: Directory: /private/var/folders/j3/zvjj264s4jj1gn1041x68tmr0000gn/T/xfs-bc79575b/node_modules/iltorb Output: info looking for cached prebuild @ /Users/richapasari/.npm/_prebuilds/cf0314-iltorb-v2.4.5-node-v115-darwin-arm64.tar.gz http request GET https://github.com/nstepien/iltorb/releases/download/v2.4.5/iltorb-v2.4.5-node-v115-darwin-arm64.tar.gz http 404 https://github.com/nstepien/iltorb/releases/download/v2.4.5/iltorb-v2.4.5-node-v115-darwin-arm64.tar.gz WARN install No prebuilt binaries found (target=20.9.0 runtime=node arch=arm64 libc= platform=darwin) yarn run v1.22.21 error Command "node-gyp" not found. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
I am using yarn4 with nodeLinker node_modules. When I am using react-select version in package.json, modern yarn works fine "react-select": "5.7.7", But when I changed it to "react-select": "git+https://github.com/MindTickle/mt-react-select.git#main", On running yarn, getting below error,
Packing react-select@https://github.com/MindTickle/mt-react-select.git#commit=b56cbdba8fd6636bb17609e61583cb26ac409905 from sources Using Yarn Classic for bootstrap. Reason: "__metadata" key not found in yarn.lock, must be a Yarn classic lockfile
➤ YN0000: Downloading https://classic.yarnpkg.com/latest.js ➤ YN0000: Saving the new release in .yarn/releases/yarn-classic.cjs ➤ YN0000: Done in 4s 137ms
yarn install v1.22.19 [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... error /private/var/folders/j3/zvjj264s4jj1gn1041x68tmr0000gn/T/xfs-bc79575b/node_modules/iltorb: Command failed. Exit code: 1 Command: node ./scripts/install.js || node-gyp rebuild Arguments: Directory: /private/var/folders/j3/zvjj264s4jj1gn1041x68tmr0000gn/T/xfs-bc79575b/node_modules/iltorb Output: info looking for cached prebuild @ /Users/richapasari/.npm/_prebuilds/cf0314-iltorb-v2.4.5-node-v115-darwin-arm64.tar.gz http request GET https://github.com/nstepien/iltorb/releases/download/v2.4.5/iltorb-v2.4.5-node-v115-darwin-arm64.tar.gz http 404 https://github.com/nstepien/iltorb/releases/download/v2.4.5/iltorb-v2.4.5-node-v115-darwin-arm64.tar.gz WARN install No prebuilt binaries found (target=20.9.0 runtime=node arch=arm64 libc= platform=darwin) yarn run v1.22.21 error Command "node-gyp" not found. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Facing similar issue where yarn is switching back to classic version even though the lockfile is correctly using newer versions :
Using Yarn Classic for bootstrap. Reason: "__metadata" key not found in yarn.lock, must be a Yarn classic lockfile