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

Unable to install Octane as a node library per documented instructions #30

Open
warlyware opened this issue Sep 14, 2023 · 1 comment
Open

Comments

@warlyware
Copy link

warlyware commented Sep 14, 2023

Describe the bug
I am attempting to install octane via the instructions documented here:
https://github.com/solana-labs/octane/blob/master/docs/library.md#install
I attempted using an existing repo as well as a new blank repo. I am using yarn v3.5.0.

To Reproduce
Steps to reproduce the behavior:

  1. Create new repo initiated with yarn init
  2. Attempt to install octane with provided instructions
  3. See error:
Usage Error: It seems you are trying to add a package using a https:... url; we now require package names to be explicitly specified.
Try running the command again with the package name prefixed: yarn add my-package@https:...
  1. Attempt to reinstall by prepending octane-core@ to the install command per error
  2. See next error:
➤ YN0000: ┌ Resolution step
➤ YN0001: │ Error: octane-core@https://gitpkg.now.sh/solana-labs/octane/packages/core?[...] isn't supported by any available resolver
    at xf.getResolverByDescriptor (/Users/warly/.cache/node/corepack/yarn/3.5.0/yarn.js:391:1647)
    at xf.bindDescriptor (/Users/warly/.cache/node/corepack/yarn/3.5.0/yarn.js:391:1036)
    at _ (/Users/warly/.cache/node/corepack/yarn/3.5.0/yarn.js:439:6900)
    at async Promise.allSettled (index 0)
    at async to (/Users/warly/.cache/node/corepack/yarn/3.5.0/yarn.js:390:10398)
    at async /Users/warly/.cache/node/corepack/yarn/3.5.0/yarn.js:439:8205
    at async Ge.startProgressPromise (/Users/warly/.cache/node/corepack/yarn/3.5.0/yarn.js:390:47579)
    at async je.resolveEverything (/Users/warly/.cache/node/corepack/yarn/3.5.0/yarn.js:439:6233)
    at async /Users/warly/.cache/node/corepack/yarn/3.5.0/yarn.js:442:2137
    at async Ge.startSectionPromise (/Users/warly/.cache/node/corepack/yarn/3.5.0/yarn.js:409:3292)
➤ YN0000: └ Completed
➤ YN0000: Failed with errors in 0s 14ms
  1. See that nothing has been installed to the node_modules folder.

Expected behavior
The package should be installed in node_modules as expected.

Screenshots
Screenshot 2023-09-14 at 12 47 46 PM

Desktop (please complete the following information):

  • OS: macOS Ventura v13.2.1
  • Browser: N/A

Additional context
I tested with yarn in an empty repo for creating this issue, however I prefer using pnpm. Until the octane library is on NPM it would be helpful to have more complete install instructions for different package managers. Ideally it would be on NPM so devs could just run pnpm add @solana-labs/octane (or preferred package manager equivalent).

@sourdzl
Copy link

sourdzl commented Apr 17, 2024

also running into this issue - trying to use pnpm and modified the documentation to

pnpm add 'https://gitpkg.now.sh/solana-labs/octane/packages/core?630a8d6afc90d2fe5aad88db2dc56c880cdbb5ad&scripts.postinstall=pnpm%20install%20--ignore-scripts%20%26%26%20pnpm%20run%20build'

but the post install hook failed as the script is hardcoded to use yarn:

Progress: resolved 1762, reused 1762, downloaded 0, added 0, done
│ Done in 3.4s
│ > @solana/[email protected] build MY_DIRECTORY/node_modules/@solana/octane-core
│ > yarn clean && tsc -p tsconfig.json
│ Usage Error: This project is configured to use pnpm
│ $ yarn ...
│  ELIFECYCLE  Command failed with exit code 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants