Search
This repository contains the front-end code that generates the UI and connects to the middle and backend.
Getting Started
1. Clone Search
git clone https://github.com/mlibrary/search.git
2. Install
npm install
3. Run Locally
npm start
Troubleshooting
TypeError: Cannot read properties of undefined (reading 'isFunction')
If you load the site and it produces this error:
Ctrl + C
)
1. Stop the browser view (pride
dependency
2. Navigate to the cd node_modules/pride
pride.js
3. Edit nano pride.js
_underscore._.
with _underscore.
and save.
4. Replace all instances of pride
5. Install npm install
6. Go back and rerun the app
cd ../../ && npm start
ERR_OSSL_EVP_UNSUPPORTED
If you run npm start
and receive this error:
Error: error:0308010C:digital envelope routines::unsupported
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
1. Check current version of Node
node --version
If the version of Node is higher than 17
, follow the next step.
2. Export NODE_OPTIONS
export NODE_OPTIONS=--openssl-legacy-provider
3. Run the app
npm start
CSS
Style using Emotion's CSS object styles. To see examples look to the ResourceAccess or Metadata modules and related components.
We no longer write new Sass for this project.
Local Development
Local development will only work if you have access to the UMich network. This is a requirment for communicating with the backend service (Spectrum).
Create React App
This project was bootstrapped with Create React App. This will explain why you are seeing a lack of configuration (babel, webpack...) since Create React App is for "creating React apps with no build configuration".