[FOLIO-1172] Get everything running on my Ubuntu 16.04 LTS desktop box Created: 03/Apr/18  Updated: 12/Nov/18  Resolved: 04/Apr/18

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P3
Reporter: Mike Taylor Assignee: Mike Taylor
Resolution: Done Votes: 0
Labels: sprint35
Remaining Estimate: Not Specified
Time Spent: 1 day
Original estimate: Not Specified

Issue links:
Relates
relates to STCOR-185 Update "configure" script Closed
relates to STCOR-186 Update "new development setup" document Closed
Sprint:

 Description   

Having done my FOLIO work on a Macbook for most of the last few months, I am trying to return to my desktop development box, which runs Ubuntu 16.04 LTS.

Needless to say, nothing works. This issue gives me a place to file yak-shaving hours.



 Comments   
Comment by Mike Taylor [ 03/Apr/18 ]

Among the nightmares: I'm unable to download and run the Vagrant box for the back-end:

mike@thor:~/git/folio/other/folio-testing-backend$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'folio/testing-backend' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'folio/testing-backend'
    default: URL: https://vagrantcloud.com/folio/testing-backend
==> default: Adding box 'folio/testing-backend' (v5.0.0-20180403.539) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/folio/boxes/testing-backend/versions/5.0.0-20180403.539/providers/virtualbox.box
/usr/lib/ruby/vendor_ruby/vagrant/action/builtin/box_add.rb:361:in `box_add': undefined method `name' for nil:NilClass (NoMethodError)
    from /usr/lib/ruby/vendor_ruby/vagrant/action/builtin/box_add.rb:266:in `add_from_metadata'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/builtin/box_add.rb:104:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/builder.rb:116:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:66:in `block in run'

I did this twice, just in case it was some kind of weird state thing. Exact same response both times. (Including downloading the VM both times.)

In addition:

mike@thor:~/git/folio/other/folio-testing-backend$ vagrant box list
folio/testing-backend (virtualbox, 5.0.0-20180131.430)
/usr/share/vagrant/plugins/commands/box/command/list.rb:55:in `block in list_boxes': undefined method `directory' for nil:NilClass (NoMethodError)
    from /usr/share/vagrant/plugins/commands/box/command/list.rb:47:in `each'
    from /usr/share/vagrant/plugins/commands/box/command/list.rb:47:in `list_boxes'
    from /usr/share/vagrant/plugins/commands/box/command/list.rb:30:in `execute'
    from /usr/share/vagrant/plugins/commands/box/command/root.rb:61:in `execute'
    from /usr/lib/ruby/vendor_ruby/vagrant/cli.rb:42:in `execute'
    from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:268:in `cli'
    from /usr/bin/vagrant:173:in `<main>'
mike@thor:~/git/folio/other/folio-testing-backend$ 

So things look pretty badly broken.

(I've asked Wayne Schneider for advice on this, but he seems to be offline.)

Comment by Mike Taylor [ 03/Apr/18 ]

Unrelated, on trying to the run the client :

```mike@thor:~/git/folio/stripes/stripes-sample-platform$ stripes serve
Waiting for webpack to build...
/home/mike/git/folio/stripes/node_modules/@folio/stripes-cli/lib/stripes-cli.js:49
    throw err;
    ^

Error: Cannot find module 'ajv-keywords'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/mike/git/folio/stripes/stripes-core/node_modules/webpack/lib/validateSchema.js:13:1)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
mike@thor:~/git/folio/stripes/stripes-sample-platform$ 

I have no idea what ajv-keywords has to do with anything.

Comment by Mike Taylor [ 03/Apr/18 ]

Regarding the form (which, OK, maybe should be its own issue), I apt-get remove}}d and {{apt-get installed vagrant; and rm -rf'd all vagrant-related files in this directory and my home directory. None of it made a blind bit of difference.

Comment by Mike Taylor [ 04/Apr/18 ]

General consensus seems to indicate that certain Vagrant releases may be Just Plain Broken when dealing with VMs whose version numbers contain hyphens. It seems at least possible that the Vagrant that comes with Ubuntu 16.04 LTS may be one of them. The problem is, the Vagrant people themselves do not release packages for Ubuntu, and the Ubuntu people have no more recent releases of Vagrant backported to 16.04.

So I have apt-get removed my Ubuntu package, and speculatively dpkg -i'd the most recent Debian package provided at https://www.vagrantup.com/downloads.html (v2.0.3). It seems to be compatible with the versions of the various shared libraries that are on my box – e.g. does not require an unsupported new major version of anything.

I am retrying to download-and-install with this.

Comment by Mike Taylor [ 04/Apr/18 ]

Aha! Something resembling success!

mike@thor:~/git/folio/other/folio-testing-backend$ time vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'folio/testing-backend' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'folio/testing-backend'
    default: URL: https://vagrantcloud.com/folio/testing-backend
==> default: Adding box 'folio/testing-backend' (v5.0.0-20180403.539) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/folio/boxes/testing-backend/versions/5.0.0-20180403.539/providers/virtualbox.box
    default: Download redirected to host: s3.amazonaws.com
==> default: Successfully added box 'folio/testing-backend' (v5.0.0-20180403.539) for 'virtualbox'!
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* The host path of the shared folder is missing: /Users/mike/git/folio/other/mod-graphql

real	7m48.238s
user	1m54.252s
sys	0m23.760s
mike@thor:~/git/folio/other/folio-testing-backend$ 

That seems to be my fault, not its. Stand by ...

Comment by Mike Taylor [ 04/Apr/18 ]

Infuriatingly, the absence of the Users/mike/git/folio/other/mod-graphql directory seems to have made the entire vagrant up procedure fail, so that having fixed that and re-run, I don't just get my existing VM brought up, I get yet another 3 Gb download – at least my fourth in this process. Good thing I don't still have a capped Internet connection, or this process alone would have exceeded my old monthly cap.

Comment by Mike Taylor [ 04/Apr/18 ]

Anyway, all this seems to have been successful – at least, I am now running a VM that I can vagrant ssh into. Now if only I could run the stripes CLI. sigh

Comment by Mike Taylor [ 04/Apr/18 ]

I brute-forced the Cannot find module 'ajv-keywords' by doing yarn add --dev ajv-keywords at the top-level of my workspace. That sort of worked (though of course it should not be necessary – packages should specify their own dependencies), in that it allowed stripes serve to at least get started.

However, it's then unable to build Stripes, complaining

ERROR in ../ui-users/converters/address.js
Module not found: Error: Can't resolve 'hashcode' in '/home/mike/git/folio/stripes/ui-users/converters'

which makes me think I might have a more fundamental problem with dependencies not getting installed.

sigh. Gotta shave them yaks.

Comment by Mike Taylor [ 04/Apr/18 ]

Yep, something is fundamentally screwy here. ui-users/packages.json specifies a dependency on hashcode v1.0.3 or better, so it ought to be available. But it's in neither the Users app's node_modules (which contains only react-flexbox-grid) nor the workspace's node_moduies. The latter has over a thousand dependent modules installed, including create-hash, hash-base, hash.js imurmurhash, node-object-hash and xxhashjs – but just those six hashers, not hashcode.

Comment by Mike Taylor [ 04/Apr/18 ]

I re-ran yarn install at the top level of my workspace.

It's took more than five minutes.

But it did do the trick. I have no idea how it got into the state it was in before, but I have lost all intellectual curiosity at this point. All I care about is: FOLIO is running on my Ubuntu box!

Generated at Thu Feb 08 23:11:21 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.