Installing resin CLI and sync

This is my first project, the tutorial says i need to install resin CLI and sync, using the command
$ npm install --global --production resin-cli
I get this error, show in the attahed files: (first image, then the log file)


With the log file:first.log (736.0 KB)

Any help? thanks

Hi @Basilisvirus,

There are a few things you need to ensure that resin-cli can be installed under a Windows environment. The documentation at the resin-cli github repository should be able to help in this regard.

Additionally (for the moment at least), the Python language is required for one of the required NPM modules. You should be able to install Python from this page which has the latest installs for Python 2.7.14 (I’d suggest maybe the MSI installer here).

Once installed, you should be able to run python from your MINGW64 window. If that works, attempting to reinstall resin-cli should work correctly.

Hope this helps!

Yo thanks, it helped me alot. I am not sure what do i want the MINGW64 window for. I use either windows cmd, git bash, i also have the ubuntu- something cmd thing. (for the resin.io projext i use the gitbash ofcourse).

@Basilisvirus There are some notes on this on the CLI repo here: https://github.com/resin-io/resin-cli#windows-support

It’s now actually not totally accurate that you need to install Python or MinGW by hand - you should be able to install windows-build-tools from Microsoft, which can automatically install everything required for a full module build environment on Windows for you, so that npm installing the CLI then completes successfully.

We’re actually in the process of deprecating resin sync, in large part because Windows support for rsync is poor, and it may be a little tricky to set up in your environment. Our new alternative is resin local push, which allows you to directly build a real new container on your local device, and is a much closer workflow to real deployment through Resin.io.

To try this out, you’ll need to:

  • Install the CLI
  • resin login to the CLI (choose web authentication)
  • Enable ‘local mode’ on the device in your Resin dashboard (go the device’s page, and it’s under ‘Actions’)
  • resin local push <your device's ip> -fs . (you can see the ip on the device’s page on the dashboard)

That should immediately trigger a Docker build on your device, restart the application once it’s successful, and start streaming you your application’s logs. The first build might take a minute or two, but after the first successful build all steps will be cached, and future pushes should take around 5 - 10s from start until your new code is up and running. Let me know if you have any trouble!

1 Like