KarrLab / datanator_frontend

Graphical web-based interface for the Datanator toolkit for discovering data for modeling cells
https://datanator.info
MIT License
1 stars 1 forks source link

Cannot navigate to links directly #197

Closed lzy7071 closed 4 years ago

lzy7071 commented 4 years ago

Example:

  1. A user could successfully search from the home page and navigate to metabolite concentration.
  2. But a user cannot navigate to the page by typing url directly in the browser.
jonrkarr commented 4 years ago

This works fine on the development server and in the tests. I suspect this is an issue with the Netlify configuration. How are the endpoints configured?

lzy7071 commented 4 years ago

There isn't any special settings on Netlify as far as I could tell. I also tried running a static server and the link did work. Let me look into it a bit further.

lzy7071 commented 4 years ago

I just tried clearing cache rebuilding from the master branch. The problem persists. Below is the entire build and deployment log:

6:17:11 PM: [feature enabled]: Nitro deploys enabled. Buckle up! ⚡️ 6:17:11 PM: Build ready to start 6:17:13 PM: build-image version: 9cade8af58c2cf3a17a1e9433d2e979149488837 6:17:13 PM: build-image tag: v3.3.5 6:17:13 PM: buildbot version: 77379b6d05a07355f28f6b725fb3c96cb742a426 6:17:13 PM: Fetching cached dependencies 6:17:14 PM: Starting to download cache of 254.9KB 6:17:14 PM: Finished downloading cache in 100.625142ms 6:17:14 PM: Starting to extract cache 6:17:14 PM: Failed to fetch cache, continuing with build 6:17:14 PM: Starting to prepare the repo for build 6:17:14 PM: No cached dependencies found. Cloning fresh repo 6:17:14 PM: git clone https://github.com/KarrLab/datanator_frontend 6:17:15 PM: Preparing Git Reference refs/heads/master 6:17:16 PM: Starting build script 6:17:16 PM: Installing dependencies 6:17:17 PM: Downloading and installing node v10.19.0... 6:17:18 PM: Downloading https://nodejs.org/dist/v10.19.0/node-v10.19.0-linux-x64.tar.xz... 6:17:18 PM: ####################### 6:17:18 PM: 33.1% 6:17:18 PM: ################################################### 6:17:18 PM: ##################### 100.0% 6:17:18 PM: Computing checksum with sha256sum 6:17:18 PM: Checksums matched! 6:17:21 PM: Now using node v10.19.0 (npm v6.13.4) 6:17:21 PM: Attempting ruby version 2.6.2, read from environment 6:17:23 PM: Using ruby version 2.6.2 6:17:23 PM: Using PHP version 5.6 6:17:23 PM: Started restoring cached node modules 6:17:23 PM: Finished restoring cached node modules 6:17:23 PM: Installing NPM modules using NPM version 6.13.4 6:18:22 PM: > node-sass@4.13.1 install /opt/build/repo/node_modules/node-sass 6:18:22 PM: > node scripts/install.js 6:18:22 PM: Downloading binary from https://github.com/sass/node-sass/releases/download/v4.13.1/linux-x64-64_binding.node 6:18:23 PM: Download complete 6:18:23 PM: Binary saved to /opt/build/repo/node_modules/node-sass/vendor/linux-x64-64/binding.node 6:18:23 PM: Caching binary to /opt/buildhome/.npm/node-sass/4.13.1/linux-x64-64_binding.node 6:18:23 PM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js 6:18:23 PM: > node -e "try{require('./postinstall')}catch(e){}" 6:18:23 PM: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library! 6:18:23 PM: The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 6:18:23 PM: > https://opencollective.com/core-js 6:18:23 PM: > https://www.patreon.com/zloirock 6:18:23 PM: Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -) 6:18:23 PM: > core-js@3.6.4 postinstall /opt/build/repo/node_modules/core-js 6:18:23 PM: > node -e "try{require('./postinstall')}catch(e){}" 6:18:24 PM: > fast-xml-parser@3.16.0 postinstall /opt/build/repo/node_modules/fast-xml-parser 6:18:24 PM: > node tasks/postinstall.js || exit 0 6:18:24 PM: Love fast-xml-parser? Check https://amitkumargupta.work for more projects and contribution. 6:18:24 PM: > cypress@4.0.2 postinstall /opt/build/repo/node_modules/cypress 6:18:24 PM: > node index.js --exec install 6:18:25 PM: Installing Cypress (version: 4.0.2) 6:18:25 PM: 6:18:25 PM: [23:18:25] Downloading Cypress [started] 6:18:28 PM: [23:18:28] Downloading Cypress [completed] 6:18:28 PM: [23:18:28] Unzipping Cypress [started] 6:18:38 PM: [23:18:38] Unzipping Cypress [completed] 6:18:38 PM: [23:18:38] Finishing Installation [started] 6:18:38 PM: [23:18:38] Finishing Installation [completed] 6:18:38 PM: 6:18:39 PM: You can now open Cypress by running: node_modules/.bin/cypress open 6:18:39 PM: https://on.cypress.io/installing-cypress 6:18:39 PM: 6:18:40 PM: > node-sass@4.13.1 postinstall /opt/build/repo/node_modules/node-sass 6:18:40 PM: > node scripts/build.js 6:18:40 PM: Binary found at /opt/build/repo/node_modules/node-sass/vendor/linux-x64-64/binding.node 6:18:40 PM: Testing binary 6:18:40 PM: Binary is fine 6:18:44 PM: npm 6:18:44 PM: WARN 6:18:44 PM: optional 6:18:44 PM: SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/watchify/node_modules/fsevents): 6:18:44 PM: npm 6:18:44 PM: WARN 6:18:44 PM: notsup 6:18:44 PM: SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 6:18:44 PM: npm 6:18:44 PM: WARN 6:18:44 PM: optional 6:18:44 PM: SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/react-scripts/node_modules/fsevents): 6:18:44 PM: npm 6:18:44 PM: WARN 6:18:44 PM: notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 6:18:44 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/fsevents): 6:18:44 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 6:18:44 PM: npm WARN optional 6:18:44 PM: SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/chokidar/node_modules/fsevents): 6:18:44 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 6:18:44 PM: added 2788 packages from 1244 contributors and audited 1810748 packages in 79.868s 6:18:47 PM: 95 packages are looking for funding 6:18:47 PM: run npm fund for details 6:18:47 PM: found 0 vulnerabilities 6:18:48 PM: NPM modules installed 6:18:48 PM: Started restoring cached go cache 6:18:48 PM: Finished restoring cached go cache 6:18:48 PM: unset GOOS; 6:18:48 PM: unset GOARCH; 6:18:48 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64'; 6:18:48 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}"; 6:18:48 PM: go version >&2; 6:18:48 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env'; 6:18:48 PM: go version go1.12 linux/amd64 6:18:48 PM: Installing missing commands 6:18:48 PM: Verify run directory 6:18:48 PM: Executing user command: npm run build 6:18:48 PM: > datanator_frontend@0.1.0 build /opt/build/repo 6:18:48 PM: > react-app-rewired build 6:18:50 PM: Creating an optimized production build... 6:20:52 PM: Compiled successfully. 6:20:52 PM: File sizes after gzip: 6:20:52 PM: 590.83 KB build/static/js/2.b2ea81b3.chunk.js 6:20:52 PM: 61.78 KB build/static/js/3.91260b09.chunk.js 6:20:52 PM: 30.69 KB build/static/css/2.652d3187.chunk.css 6:20:52 PM: 28.8 KB build/static/js/main.a92fd7b3.chunk.js 6:20:52 PM: 24.98 KB build/static/js/7.9a8a8387.chunk.js 6:20:52 PM: 5.55 KB build/static/js/8.1089f8a8.chunk.js 6:20:52 PM: 5.54 KB build/static/js/5.e76e0750.chunk.js 6:20:52 PM: 5.36 KB build/static/css/main.73f23816.chunk.css 6:20:52 PM: 3.33 KB build/static/js/4.c2bc25a5.chunk.js 6:20:52 PM: 1.96 KB build/static/js/6.0ee9e683.chunk.js 6:20:52 PM: 1.22 KB build/static/js/runtime-main.9b1eea9d.js 6:20:52 PM: The project was built assuming it is hosted at https://datanator.info. 6:20:52 PM: You can control this with the homepage field in your package.json. 6:20:52 PM: The build folder is ready to be deployed. 6:20:52 PM: You may serve it with a static server: 6:20:52 PM: npm install -g serve 6:20:52 PM: serve -s build 6:20:52 PM: Find out more about deployment here: 6:20:52 PM: bit.ly/CRA-deploy 6:20:53 PM: Skipping functions preparation step: no functions directory set 6:20:53 PM: Caching artifacts 6:20:53 PM: Started saving node modules 6:20:53 PM: Finished saving node modules 6:20:53 PM: Started saving pip cache 6:20:58 PM: Finished saving pip cache 6:20:58 PM: Started saving emacs cask dependencies 6:20:58 PM: Finished saving emacs cask dependencies 6:20:58 PM: Started saving maven dependencies 6:20:58 PM: Finished saving maven dependencies 6:20:58 PM: Started saving boot dependencies 6:20:58 PM: Finished saving boot dependencies 6:20:58 PM: Started saving go dependencies 6:20:58 PM: Finished saving go dependencies 6:21:01 PM: Build script success 6:21:01 PM: Starting to deploy site from 'build/' 6:21:01 PM: Creating deploy tree 6:21:02 PM: 0 new files to upload 6:21:02 PM: 0 new functions to upload 6:21:02 PM: Starting post processing 6:21:02 PM: Post processing done 6:21:02 PM: Site is live

lzy7071 commented 4 years ago

Resolved by adding a _redirects file in public/ directory.