[FOLIO-520] Demo failure: http://folio-uidemo.aws.indexdata.com/ Created: 24/Mar/17  Updated: 12/Nov/18  Resolved: 28/Mar/17

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

Type: Bug Priority: P1
Reporter: Mike Taylor Assignee: John Malconian
Resolution: Done Votes: 0
Labels: sprint11
Remaining Estimate: Not Specified
Time Spent: 3 hours
Original estimate: Not Specified

Sprint:

 Description   

Cate has spotted a problem with the Stripes/FOLIO demo at http://folio-uidemo.aws.indexdata.com/

Log in as usual (diku_admin/admin). That works fine. But if you then go to (say) the Users app, nothing displays and the JS console shows:

Uncaught TypeError: Cannot read property 'hasPerm' of undefined (IfPermission.js 4)

This is telling us that we are using an insufficiently recent stripes-core – we need at least v0.3.0 (and 0.4.0 would be better). But I have no idea how the demo site is built. What steps do we need to take?



 Comments   
Comment by Mike Taylor [ 24/Mar/17 ]

I have done this, more in hope than in expectation:
https://github.com/folio-org/stripes-sample-platform/commit/1d01eab42e7c355ddb2beb0ce327b4078aba2033

Comment by Mike Taylor [ 24/Mar/17 ]

Sadly, it looks like the stripes-sample-platform commit alone was not enough to fix the problem – at least, not after four minutes. (I suppose it's possible that there's a CI setup that checks for changes every ten minutes or every hour or something.)

Comment by John Malconian [ 24/Mar/17 ]

Demo has been rebuilt after fixing a few deployment issues. stripes-core and the ui modules should be at the latest revision. removed ui-okapi-console from the demo as it is causing problems with the functioning of the other stripes modules (See: STRIPES-264 Closed ).

Comment by Mike Taylor [ 24/Mar/17 ]

Looks good, thanks John.

BTW., does anyone know why the demo doesn't have the FOLIO logo on the left, and has the module names left-aligned instead of right-aligned? It's a strange difference from when we run it normally.

Comment by Cate Boerema (Inactive) [ 27/Mar/17 ]

Thanks guys! It's working.

Comment by Jakub Skoczen [ 27/Mar/17 ]

How can we ensure that the right dependencies/versions are propagated down to the demo? Where is this captured John Malconian?

Comment by Mike Taylor [ 27/Mar/17 ]

The correct answer is simply to use the most recent version of stripes-sample-platform, and it will pull in the dependencies it needs.

The problem in this case occurred because we didn't update the dependencies correctly.

Comment by Mike Taylor [ 28/Mar/17 ]

New problem this morning:

ERROR in ./~/@folio/items/settings/MaterialTypesSettings.js
Module not found: Error: Can't resolve '@folio/stripes-components/lib/structures/EditableList' in '/home/folio/node_modules/@folio/items/settings'
 @ ./~/@folio/items/settings/MaterialTypesSettings.js 23:20-84
 @ ./~/@folio/items/settings/index.js
 @ ./~/@folio/stripes-core/src/components/Settings/Settings.js
 @ ./~/@folio/stripes-core/src/Root.js
 @ ./~/@folio/stripes-core/src/index.js
 @ multi webpack-hot-middleware/client ./~/@folio/stripes-core/src/index
Comment by Mike Taylor [ 28/Mar/17 ]

The problem is that we are using the git-head version of ui-items (which uses the <EditableList> component) and it has has not had its dependencies updated to require the new version of stripes-components that provides it.

And while the current git head of stripes-components has that new component, it's not in the most recent release.

Comment by Mike Taylor [ 28/Mar/17 ]

I've released v0.5.0 of stripes-components: https://github.com/folio-org/stripes-components/blob/master/CHANGELOG.md

And I gave updated the ui-users package.json to depend on it.

So all should now be well the next time the site gets rebuilt. But I don't know when that is – does anyone?

Comment by Mike Taylor [ 28/Mar/17 ]

Reassigned to John Malconian to either rebuild the demo or tell us how to do it!

Comment by John Malconian [ 28/Mar/17 ]

I've rebuilt the demo with the latest Stripes changes and it seems to running fine by all accounts.

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