ssc-oscar / DRE

MIT License
4 stars 10 forks source link

Sampling seems to have stopped working #89

Open audrism opened 2 years ago

audrism commented 2 years ago

I'd like to update it to use version U of data and make more sophisticated options, but it seems to always return empty (header) json.

worldofcode.org has old version and lookup.worldofcode.org new

Both do not work at present.

sylviesworld commented 2 years ago

Is the new version on the master branch?

audrism commented 2 years ago

No, should I push it?

sylviesworld commented 2 years ago

Can you push it to a new branch?

audrism commented 2 years ago

branch is sampling

sylviesworld commented 2 years ago

I fixed this for the "Projects" and "Authors" but the "APIs" schema you added recently doesn't seem to work.

image

Seems like it doesn't have a "EarliestCommitDate" and "LatestCommitDate" item like the other two do.

audrism commented 2 years ago

Fixed

db.API_metadata.U.findOne()
{
  _id: ObjectId("6255983d6c3cabdb117af9b0"),
  FileInfo: { 'C/C++': 2 },
  NumAuthors: 1,
  EarliestCommitDate: 1598180683,
  NumProjects: 1,
  NumCommits: 2,
  API: 'C:03_08_07_Doublets.cpp',
  LatestCommitDate: 1598241990
}
sylviesworld commented 2 years ago

I pushed fix to the sampling branch. See if it works on your end when you can.

audrism commented 2 years ago

perhaps I need to run npm update or DatePicker not in packages.json?

ERROR in ./client/app/components/Sampling/SamplingRestrictionForm.js 34:0-60
Module not found: Error: Can't resolve '@mui/x-date-pickers/DatePicker' in '/home/audris/swsc/DRE/client/app/components/Sampling'
 @ ./client/app/components/Sampling/SamplingRestrictionPage.js 27:0-64 46:42-65
 @ ./client/app/index.js 22:0-84 84:13-36

ERROR in ./client/app/components/Sampling/SamplingRestrictionForm.js 35:0-80
Module not found: Error: Can't resolve '@mui/x-date-pickers/LocalizationProvider' in '/home/audris/swsc/DRE/client/app/components/Sampling'
 @ ./client/app/components/Sampling/SamplingRestrictionPage.js 27:0-64 46:42-65
 @ ./client/app/index.js 22:0-84 84:13-36

ERROR in ./client/app/components/Sampling/SamplingRestrictionForm.js 36:0-68
Module not found: Error: Can't resolve '@mui/x-date-pickers/AdapterDateFns' in '/home/audris/swsc/DRE/client/app/components/Sampling'
 @ ./client/app/components/Sampling/SamplingRestrictionPage.js 27:0-64 46:42-65
 @ ./client/app/index.js 22:0-84 84:13-36
sylviesworld commented 2 years ago

Try running npm install. The module we were using changed to the @mui/x-date-pickers that I added to the package.json file

audrism commented 2 years ago

hmm, did you push package.json file to sampling branch? I run update with legacy peers, but:

>>> __ Open https://0.0.0.0:8443/ in your browser.                                                                                                   [876/1890]
webpack built 6276316a601148a5f832 in 31419ms
assets by path assets/vendor/@fortawesome/fontawesome-free/svgs/solid/*.svg 649 KiB 811 assets
assets by path assets/vendor/@fortawesome/fontawesome-free/svgs/brands/*.svg 440 KiB 381 assets
assets by path assets/vendor/@fortawesome/fontawesome-free/svgs/regular/*.svg 135 KiB 152 assets
assets by info 2.55 MiB [immutable] 21 assets
assets by path assets/img/ 1.33 MiB 15 assets
assets by path assets/vendor/@fortawesome/fontawesome-free/webfonts/ 2.36 MiB 15 assets
assets by path assets/vendor/nucleo/ 188 KiB 7 assets
assets by path assets/vendor/@fortawesome/fontawesome-free/css/*.css 126 KiB 7 assets
assets by path assets/vendor/@fortawesome/fontawesome-free/js/*.js 1.9 MiB 6 assets
assets by path assets/vendor/@fortawesome/fontawesome-free/sprites/*.svg 1.04 MiB 3 assets
assets by path assets/css/ 952 KiB 3 assets
assets by path *.html 3.5 KiB 3 assets
asset js/app.js 22.6 MiB [emitted] [minimized] (name: app) 1 related asset
asset assets/vendor/@fortawesome/fontawesome-free/LICENSE.txt 1.51 KiB [emitted] [from: client/public/assets/vendor/@fortawesome/fontawesome-free/LICENSE.txt] 
[copied]

ERROR in ./node_modules/@mui/x-date-pickers/CalendarPicker/CalendarPicker.js 7:0-61
Module not found: Error: Can't resolve '@mui/material/styles' in '/home/audris/swsc/DRE/node_modules/@mui/x-date-pickers/CalendarPicker'
 @ ./node_modules/@mui/x-date-pickers/internals/components/CalendarOrClockPicker/CalendarOrClockPicker.js 8:0-72 104:67-81
 @ ./node_modules/@mui/x-date-pickers/internals/components/CalendarOrClockPicker/index.js 1:0-64 1:0-64
 @ ./node_modules/@mui/x-date-pickers/DesktopDatePicker/DesktopDatePicker.js 9:0-86 64:32-53
 @ ./node_modules/@mui/x-date-pickers/DesktopDatePicker/index.js 1:0-56 1:0-56
 @ ./node_modules/@mui/x-date-pickers/DatePicker/DatePicker.js 8:0-57 44:29-46
 @ ./node_modules/@mui/x-date-pickers/DatePicker/index.js 1:0-42 1:0-42
 @ ./client/app/components/Sampling/SamplingRestrictionForm.js 34:0-60 301:42-52 316:43-53
 @ ./client/app/components/Sampling/SamplingRestrictionPage.js 27:0-64 46:42-65 
 @ ./client/app/index.js 22:0-84 84:13-36

Do I really need to reinstall npm from scratch?

sylviesworld commented 2 years ago

image

You don't need to reinstall npm. Try deleting package-lock.json and the node_modules folder and run npm install. Sometimes npm is finicky and you need to do a fresh install of the packages.

audrism commented 2 years ago

removed node_modules and package-lock.json Should I update npm itself?

npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: DRE@1.0.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.4.1" from react-d3-graph@2.6.0
npm ERR! node_modules/react-d3-graph
npm ERR!   react-d3-graph@"2.6.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/audris/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/audris/.npm/_logs/2022-04-18T18_46_57_910Z-debug.log
sylviesworld commented 2 years ago

That shouldn't be necessary. Try with the --legacy-peer-deps flag (full command npm install --legacy-peer-deps)

audrism commented 2 years ago

updated node/npm:

node -v
v16.14.2
npm -v
8.5.0

master works but sampling branch runs but no application is visible in the browser see:server at lookup.worldofcode.org

Client debug shows:

Uncaught ReferenceError: regeneratorRuntime is not defined