Uploaded image for project: 'Stripes'
  1. Stripes
  2. STRIPES-344

Error with Stripes yarn install on Vagrant on Windows host

    Details

      Description

      While following the instructions here precisely:

      http://dev.folio.org/curriculum/01_deploy_test_stripes_module

      I ran into these issues. On the step to "yarn install"

      vagrant@contrib-jessie:/vagrant/stripes-tutorial-platform$ yarn install
      yarn install v0.21.3
      info No lockfile found.
      warning No license field
      [1/4] Resolving packages...
      [2/4] Fetching packages...
      warning fsevents@1.1.1: The platform "linux" is incompatible with this module.
      info "fsevents@1.1.1" is an optional dependency and failed compatibility check.
      Excluding it from installation.
      [3/4] Linking dependencies...
      warning "eslint-import-resolver-webpack@0.8.1" has unmet peer dependency "eslint
      -plugin-import@>=1.4.0".
      error An unexpected error occurred: "EPROTO: protocol error, symlink '../../../b
      rowserslist/cli.js' -> '/vagrant/stripes-tutorial-platform/node_modules/autopref
      ixer/node_modules/.bin/browserslist'".
      info If you think this is a bug, please open a bug report with the information p
      rovided in "/vagrant/stripes-tutorial-platform/yarn-error.log".
      info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this
      command.
      

      Searching for that "EPROTO: protocol error, symlink" led to several tech answers about this. Seems like if Vagrant is on a Windows host it can't create symlinks.

      Some suggested to use the --no-bin-links option on yarn install, to skip making the symlinks that can't be done anyway. There are still warnings but the install completes:

      vagrant@contrib-jessie:/vagrant/stripes-tutorial-platform$ yarn install --no-bi
      n-links
      yarn install v0.21.3
      info No lockfile found.
      warning No license field
      [1/4] Resolving packages...
      [2/4] Fetching packages...
      warning fsevents@1.1.1: The platform "linux" is incompatible with this module.
      info "fsevents@1.1.1" is an optional dependency and failed compatibility check.
      Excluding it from installation.
      [3/4] Linking dependencies...
      warning "eslint-import-resolver-webpack@0.8.1" has unmet peer dependency "eslint
      -plugin-import@>=1.4.0".
      [4/4] Building fresh packages...
      success Saved lockfile.
      Done in 25.71s.
      

      Install finished sans symlinks. When I try to start it can't find "stripes".

      vagrant@contrib-jessie:/vagrant/stripes-tutorial-platform$ yarn start
      yarn start v0.21.3
      $ stripes dev stripes.config.js
      sh: 1: stripes: not found
      error Command failed with exit code 127.
      

      Probably because a symlink wasn't created for the stripes binary?

      I cleaned up and repeated the same steps using this document:
      https://github.com/folio-org/stripes-core/blob/master/doc/quick-start.md
      Tried this because newer versions listed for some dependencies. But same error as above, can't find the stripes binary.

        Attachments

          Expenses

            Activity

            Hide
            mike Mike Taylor added a comment -

            Clint, so sorry that this request dropped through the gaps in the floorboards. We are right now instituting a triage system so that future issues that get files here land up on someone's plate instead of floating around unassigned.

            I don't under Windows myself – we are basically a Unix house – so I can't directly help you. But I have linked John Coburn into this issue, and he does run Stripes on Windows. John, do you have any light to shed?

            Show
            mike Mike Taylor added a comment - Clint, so sorry that this request dropped through the gaps in the floorboards. We are right now instituting a triage system so that future issues that get files here land up on someone's plate instead of floating around unassigned. I don't under Windows myself – we are basically a Unix house – so I can't directly help you. But I have linked John Coburn into this issue, and he does run Stripes on Windows. John, do you have any light to shed?
            Hide
            clintbellanger Clint Bellanger added a comment -

            I found the specific issue I was dealing with here: launching Vagrant from a Window Command Prompt will not support symlinks inside that VM if the Command Prompt itself was not Run As Administrator.

            This wasn't obvious to me because most of the Vagrant box was working otherwise.

            Maybe the FOLIO Developer Curriculum can use a note about this. If launching Vagrant from a Windows Command Prompt, be sure to Run As Administrator when opening the Command Prompt itself (cmd.exe)

            Show
            clintbellanger Clint Bellanger added a comment - I found the specific issue I was dealing with here: launching Vagrant from a Window Command Prompt will not support symlinks inside that VM if the Command Prompt itself was not Run As Administrator. This wasn't obvious to me because most of the Vagrant box was working otherwise. Maybe the FOLIO Developer Curriculum can use a note about this. If launching Vagrant from a Windows Command Prompt, be sure to Run As Administrator when opening the Command Prompt itself (cmd.exe)
            Hide
            mike Mike Taylor added a comment -

            Clint, congratulations on finding the appallingly obscure solution to this issue! I really appreciate your reporting back – I'm only sorry we weren't able to help you to get there more quickly.

            You are absolutely right that this gotcha should go in the curriculum. I have added Peter Murray to this issue, so he'll know to do so; and also David Crossley, so he can add it to the troubleshooting guide. Peter and David, please leave a note on this issue so we know when it's been done; then we'll be able to close this.

            Show
            mike Mike Taylor added a comment - Clint, congratulations on finding the appallingly obscure solution to this issue! I really appreciate your reporting back – I'm only sorry we weren't able to help you to get there more quickly. You are absolutely right that this gotcha should go in the curriculum. I have added Peter Murray to this issue, so he'll know to do so; and also David Crossley , so he can add it to the troubleshooting guide. Peter and David, please leave a note on this issue so we know when it's been done; then we'll be able to close this.
            Hide
            peter Peter Murray added a comment -

            Working on the curriculum.

            Show
            peter Peter Murray added a comment - Working on the curriculum.
            Hide
            peter Peter Murray added a comment -

            Fixed in the curriculum. Thanks for pointing it out, Clint Bellanger.

            Show
            peter Peter Murray added a comment - Fixed in the curriculum. Thanks for pointing it out, Clint Bellanger .
            Hide
            clintbellanger Clint Bellanger added a comment -

            The curriculum note looks great. Thanks all!

            Show
            clintbellanger Clint Bellanger added a comment - The curriculum note looks great. Thanks all!
            Show
            dcrossley David Crossley added a comment - Copied that text to: http://dev.folio.org/doc/troubleshooting#launching-vagrant-on-windows https://github.com/folio-org/folio-ansible/blob/master/doc/index.md#launching-vagrant-on-windows

              People

              • Assignee:
                Unassigned
                Reporter:
                clintbellanger Clint Bellanger
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h