dfinity / vessel

The original package manager for Motoko
Apache License 2.0
113 stars 19 forks source link

improve install instructions #36

Closed electrovir closed 1 year ago

electrovir commented 2 years ago

The README currently states:

  1. Download a copy of the vessel binary from the release page or build one yourself
  2. Run vessel init in your project root.

There are a lot of steps missing in between 1 and 2. What do I do with the binary once I've downloaded it? Etc.

On macOS I had to chmod +x it, try to run it via ./vessel-macos, open System Preferences > Security & Privacy and allow it to run, then I had to move it somewhere to it's in my path (I chose /usr/local/bin based on this answer on StackExchange).

Issue #35 in here references a vessel-install.sh script, but I don't see that anywhere in this repo.

nnsdaos commented 2 years ago

@electrovir I think if it was a pkg file, it would be less harmful to newbies.

ClankPan commented 2 years ago

I tried these steps.

  1. download the binary : "vessel-macos".
  2. move it to "/usr/local".
  3. run chmod +x /usr/local/vessel-macos.
  4. add export PATH=$PATH:/usr/local/vessel-macos & alias vessel='vessel-macos' to ~/.zshrc.
  5. run source ~/.zshrc.

I've been able to use vessel in CLI, but I got this error when ran dfx.json's "packtool": "vessel sources".

Building canisters...
The build step failed for canister 'ryjl3-tyaaa-aaaaa-aaaba-cai' with an embedded error: Failed to invoke the package tool "./vessel" "sources"
 the error was: No such file or directory (os error 2)
fury02 commented 2 years ago

Hi I ran into this problem myself. Yes, this is a barrier. I found it this way, maybe it will be useful to someone. This is a problem with aliases in the Operating system. In dfx.json

 "defaults": {
    "build": {
      "args": "",
      "packtool": "vessel-linux64 sources"
    }
  },

"vessel-linux64 sources"

ArjaanBuijk commented 2 years ago

This should work, just move it to /usr/local/bin/vessel.

/usr/local/bin is already on the path, so no alias needed.

The exact steps:

# download the binary : "vessel-macos".

# Move it to /usr/local/bin/vessel
mv ~/Downloads/vessel-macos /usr/local/bin/vessel

# make it executable
chmod +x /usr/local/bin/vessel

# Test it. 
$ vessel --version
# The first time you run it, it  will be blocked, but you can unblock it...
# > Apple menu  > System Preferences, click Security & Privacy , then click General.
# (-) If the lock at the bottom left is locked , click it to unlock the preference pane.
# (-) Click on `open it anyways...`
emenylouu commented 2 years ago
vessel --version

worked for me! Thanks.

rvanasa commented 1 year ago

Closing since the readme now contains more detailed installation instructions.