Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sorting on Publishers page is missing #12

Open
danstoner opened this issue May 15, 2019 · 16 comments
Open

sorting on Publishers page is missing #12

danstoner opened this issue May 15, 2019 · 16 comments

Comments

@danstoner
Copy link
Contributor

regarding https://www.idigbio.org/portal/publishers

The lists in each section used to be sortable by clicking on each column heading. The little up/down arrow indicators for sort are not visible and clicking in the column header does not seem to do anything.

My Chrome dev console contains:

Uncaught TypeError: $(...).tablesorter is not a function

@danstoner danstoner changed the title sorting on Publishers page is broken (again?) sorting on Publishers page May 15, 2019
@danstoner danstoner changed the title sorting on Publishers page sorting on Publishers page is missing May 15, 2019
@danstoner
Copy link
Contributor Author

@danstoner
Copy link
Contributor Author

danstoner commented May 30, 2019

It appears that despite the following commit to include a more recent version of jquery (3.3.x), we are still loading v2.2.4.

0f3f7d9

Perhaps we are loading two versions (that is hint of previous post).

Or is the production portal not actually deployed including that commit?

Screenshot with some info...

Screenshot from 2019-05-29 21-48-48

@wilsotc
Copy link
Contributor

wilsotc commented May 31, 2019 via email

@danstoner
Copy link
Contributor Author

danstoner commented Jun 6, 2019

The following looks like a maintained fork but I have not figured out how to integrate it properly into the... complex... javascript environment we are running.

https://github.com/Mottie/tablesorter

During my struggle, I have seen a number of recommendations against using jQuery in React apps since they both manipulate the DOM.

One solution might be to refactor the publishers page to use native React component / react-bootstrap-table / react-bootstrap-table-next

https://react-bootstrap-table.github.io/react-bootstrap-table2/

https://www.npmjs.com/package/react-table

@danstoner
Copy link
Contributor Author

What. the. bloody. hell.
Twice over.

Earlier in the week... Didn't work. Didn't work. Didn't work. Tried a dozen things. Didn't work.

Tonight when I fired things up I have table sorting on the publishers page (locally).

I cloned a fresh copy of master branch again tonight and sorting just works with no apparent code changes.

So at least here is screenshot of what publishers page looks like with table sorting on columns...

Screenshot from 2019-06-07 21-53-30

And then it stopped working again!

So perhaps it all has to do with the order that modules are getting loaded, and occasionally they load in an order that is favorable to tablesorter.

@danstoner
Copy link
Contributor Author

danstoner commented Jun 8, 2019

I have a case where running locally from one directory provides sorting (and no console error about tablesorter) and the other directory does not provide sorting (and errors on tablesorter):

dan@D-Latitude-7370:~/git/idb-portal$ yarn --verbose start
yarn run v1.16.0
verbose 0.231 Checking for configuration file "/home/dan/git/idb-portal/.npmrc".
verbose 0.232 Checking for configuration file "/home/dan/.npmrc".
verbose 0.232 Checking for configuration file "/usr/etc/npmrc".
verbose 0.232 Checking for configuration file "/home/dan/git/idb-portal/.npmrc".
verbose 0.233 Checking for configuration file "/home/dan/git/.npmrc".
verbose 0.233 Checking for configuration file "/home/dan/.npmrc".
verbose 0.233 Checking for configuration file "/home/.npmrc".
verbose 0.234 Checking for configuration file "/home/dan/git/idb-portal/.yarnrc".
verbose 0.234 Checking for configuration file "/home/dan/.yarnrc".
verbose 0.234 Found configuration file "/home/dan/.yarnrc".
verbose 0.234 Checking for configuration file "/usr/etc/yarnrc".
verbose 0.234 Checking for configuration file "/home/dan/git/idb-portal/.yarnrc".
verbose 0.234 Checking for configuration file "/home/dan/git/.yarnrc".
verbose 0.234 Checking for configuration file "/home/dan/.yarnrc".
verbose 0.235 Found configuration file "/home/dan/.yarnrc".
verbose 0.235 Checking for configuration file "/home/.yarnrc".
verbose 0.241 current time: 2019-06-08T02:48:24.421Z
$ node index.js
Warning: Accessing createClass via the main React package is deprecated, and will be removed in React v16.0. Use a plain JavaScript class instead. If you're not yet ready to migrate, create-react-class v15.* is available on npm as a temporary, drop-in replacement. For more info see https://fb.me/react-create-class
Server(main) listening on port 3000
::1 - "GET /portal/publishers HTTP/1.1" 200 - - 33.351 ms
dan@D-Latitude-7370:~/git/STAGING/FRESH/idb-portal$ yarn --verbose start
yarn run v1.16.0
verbose 0.279 Checking for configuration file "/home/dan/git/STAGING/FRESH/idb-portal/.npmrc".
verbose 0.28 Checking for configuration file "/home/dan/.npmrc".
verbose 0.28 Checking for configuration file "/usr/etc/npmrc".
verbose 0.28 Checking for configuration file "/home/dan/git/STAGING/FRESH/idb-portal/.npmrc".
verbose 0.28 Checking for configuration file "/home/dan/git/STAGING/FRESH/.npmrc".
verbose 0.28 Checking for configuration file "/home/dan/git/STAGING/.npmrc".
verbose 0.281 Checking for configuration file "/home/dan/git/.npmrc".
verbose 0.281 Checking for configuration file "/home/dan/.npmrc".
verbose 0.281 Checking for configuration file "/home/.npmrc".
verbose 0.282 Checking for configuration file "/home/dan/git/STAGING/FRESH/idb-portal/.yarnrc".
verbose 0.282 Checking for configuration file "/home/dan/.yarnrc".
verbose 0.282 Found configuration file "/home/dan/.yarnrc".
verbose 0.282 Checking for configuration file "/usr/etc/yarnrc".
verbose 0.282 Checking for configuration file "/home/dan/git/STAGING/FRESH/idb-portal/.yarnrc".
verbose 0.282 Checking for configuration file "/home/dan/git/STAGING/FRESH/.yarnrc".
verbose 0.283 Checking for configuration file "/home/dan/git/STAGING/.yarnrc".
verbose 0.283 Checking for configuration file "/home/dan/git/.yarnrc".
verbose 0.283 Checking for configuration file "/home/dan/.yarnrc".
verbose 0.283 Found configuration file "/home/dan/.yarnrc".
verbose 0.283 Checking for configuration file "/home/.yarnrc".
verbose 0.291 current time: 2019-06-08T02:52:01.278Z
$ node index.js
Warning: Accessing createClass via the main React package is deprecated, and will be removed in React v16.0. Use a plain JavaScript class instead. If you're not yet ready to migrate, create-react-class v15.* is available on npm as a temporary, drop-in replacement. For more info see https://fb.me/react-create-class
Server(main) listening on port 3000
::1 - "GET /portal/publishers HTTP/1.1" 200 - - 32.452 ms

The git checkouts are identical.

There are a good many differences located in the git ignored directories. This hints at a problem with the build process.

node_modules/
public/components/
public/vendor/
public/client/js/react/build/
*~
.nide
public/js/*
yarn-error.log

It will take me a while to go thru the diff.

...
Only in /home/dan/git/idb-portal/node_modules/tablesorter/dist/js/widgets: widget-vertical-group.min.js
Files /home/dan/git/STAGING/FRESH/idb-portal/node_modules/tablesorter/dist/js/widgets/widget-view.min.js and /home/dan/git/idb-portal/node_modules/tablesorter/dist/js/widgets/widget-view.min.js differ
Only in /home/dan/git/STAGING/FRESH/idb-portal/node_modules/tablesorter: node_modules
Only in /home/dan/git/STAGING/FRESH/idb-portal/node_modules/tablesorter: package.json
Only in /home/dan/git/idb-portal/node_modules: tablesorter_old
Only in /home/dan/git/idb-portal/node_modules: to-object-path
Only in /home/dan/git/idb-portal/node_modules: to-regex
Only in /home/dan/git/idb-portal/node_modules: to-regex-range
Only in /home/dan/git/idb-portal/node_modules: union-value
Only in /home/dan/git/idb-portal/node_modules: unset-value
Only in /home/dan/git/idb-portal/node_modules: use
Only in /home/dan/git/idb-portal/node_modules/user-home: cli.js
Files /home/dan/git/STAGING/FRESH/idb-portal/node_modules/user-home/index.js and /home/dan/git/idb-portal/node_modules/user-home/index.js differ
Files /home/dan/git/STAGING/FRESH/idb-portal/node_modules/user-home/package.json and /home/dan/git/idb-portal/node_modules/user-home/package.json differ
Only in /home/dan/git/STAGING/FRESH/idb-portal/node_modules/v8flags/node_modules: user-home
Only in /home/dan/git/STAGING/FRESH/idb-portal/node_modules/yargs: node_modules
Only in /home/dan/git/STAGING/FRESH/idb-portal/node_modules/yargs-parser: node_modules
Files /home/dan/git/STAGING/FRESH/idb-portal/node_modules/.yarn-integrity and /home/dan/git/idb-portal/node_modules/.yarn-integrity differ
Files /home/dan/git/STAGING/FRESH/idb-portal/public/client/js/react/build/publishers.js and /home/dan/git/idb-portal/public/client/js/react/build/publishers.js differ
Files /home/dan/git/STAGING/FRESH/idb-portal/public/client/js/react/build/publishers.js.map and /home/dan/git/idb-portal/public/client/js/react/build/publishers.js.map differ
Only in /home/dan/git/idb-portal/public/client/js/react/src: publishers-new.js
Files /home/dan/git/STAGING/FRESH/idb-portal/public/js/client.js and /home/dan/git/idb-portal/public/js/client.js differ
Files /home/dan/git/STAGING/FRESH/idb-portal/public/js/client.js.map and /home/dan/git/idb-portal/public/js/client.js.map differ
Files /home/dan/git/STAGING/FRESH/idb-portal/public/js/idbmap.js and /home/dan/git/idb-portal/public/js/idbmap.js differ
Files /home/dan/git/STAGING/FRESH/idb-portal/public/js/idbmap.js.map and /home/dan/git/idb-portal/public/js/idbmap.js.map differ
Files /home/dan/git/STAGING/FRESH/idb-portal/public/js/libs.js and /home/dan/git/idb-portal/public/js/libs.js differ
Files /home/dan/git/STAGING/FRESH/idb-portal/public/js/libs.js.map and /home/dan/git/idb-portal/public/js/libs.js.map differ
dan@D-Latitude-7370:~/git/STAGING/FRESH/idb-portal$ head -n1 ~/git/idb-portal/node_modules/tablesorter/dist/js/jquery.tablesorter.combined.js
/*! tablesorter (FORK) - updated 2018-11-20 (v2.31.1)*/
dan@D-Latitude-7370:~/git/STAGING/FRESH/idb-portal$ head -n1 ~/git/STAGING/FRESH/idb-portal/node_modules/tablesorter/dist/js/jquery.tablesorter.combined.js
/*! tablesorter (FORK) - updated 09-27-2017 (v2.29.0)*/

@danstoner
Copy link
Contributor Author

Mind you I was futzing around with some of those ignored dirs manually.

@danstoner
Copy link
Contributor Author

In the "working" version:

yarn check v1.16.0
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
error "camelcase" is wrong version: expected "1.2.1", got "3.0.0"
error "concat-stream" is wrong version: expected "1.5.2", got "1.6.0"
warning "es6-symbol#es5-ext@~0.10.11" could be deduped from "0.10.37" to "[email protected]"
warning "readable-stream#inherits@~2.0.1" could be deduped from "2.0.3" to "[email protected]"
error "griddle-react" is wrong version: expected "0.6.1", got null
warning "hiredis#bindings@^1.2.1" could be deduped from "1.3.1" to "[email protected]"
error "jquery-ui-browserify" is wrong version: expected "1.11.0-pre-seelio", got null
warning "request#uuid@^3.0.0" could be deduped from "3.2.1" to "[email protected]"
warning "babel-core#babel-traverse@^6.23.1" could be deduped from "6.26.0" to "[email protected]"
warning "babel-core#babel-types@^6.23.0" could be deduped from "6.26.0" to "[email protected]"
warning "babel-core#babylon@^6.11.0" could be deduped from "6.18.0" to "[email protected]"
warning "browserify#inherits@~2.0.1" could be deduped from "2.0.3" to "[email protected]"
warning "babel-core#babel-generator#babel-types@^6.23.0" could be deduped from "6.26.0" to "[email protected]"
warning "babel-core#babel-traverse#babel-types@^6.23.0" could be deduped from "6.26.0" to "[email protected]"
warning "babel-core#babel-types#to-fast-properties@^1.0.1" could be deduped from "1.0.3" to "[email protected]"
error "yargs#camelcase" not installed
error "eslint#concat-stream" not installed
error "browserify-css#concat-stream" not installed
warning "gulp-babel#gulp-util#fancy-log@^1.1.0" could be deduped from "1.3.2" to "[email protected]"
error "concat-stream#inherits" not installed
error "tablesorter#jquery" not installed
error "gulp#liftoff" is wrong version: expected "2.3.0", got "2.5.0"
warning "npm-shrinkwrap#npm#abbrev@~1.0.9" could be deduped from "1.0.9" to "[email protected]"
warning "npm-shrinkwrap#npm#ansi@~0.3.1" could be deduped from "0.3.1" to "[email protected]"
warning "npm-shrinkwrap#npm#ansistyles@~0.1.3" could be deduped from "0.1.3" to "[email protected]"
warning "npm-shrinkwrap#npm#archy@~1.0.0" could be deduped from "1.0.0" to "[email protected]"
warning "npm-shrinkwrap#npm#async-some@~1.0.2" could be deduped from "1.0.2" to "[email protected]"
warning "npm-shrinkwrap#npm#[email protected]" could be deduped from "0.0.9" to "[email protected]"
warning "npm-shrinkwrap#npm#char-spinner@~1.0.1" could be deduped from "1.0.1" to "[email protected]"
warning "npm-shrinkwrap#npm#chmodr@~1.0.2" could be deduped from "1.0.2" to "[email protected]"
warning "npm-shrinkwrap#npm#chownr@~1.0.1" could be deduped from "1.0.1" to "[email protected]"
warning "npm-shrinkwrap#npm#cmd-shim@~2.0.2" could be deduped from "2.0.2" to "[email protected]"
warning "npm-shrinkwrap#npm#columnify@~1.5.4" could be deduped from "1.5.4" to "[email protected]"
warning "npm-shrinkwrap#npm#config-chain@~1.1.10" could be deduped from "1.1.11" to "[email protected]"
warning "npm-shrinkwrap#npm#dezalgo@~1.0.3" could be deduped from "1.0.3" to "[email protected]"
warning "npm-shrinkwrap#npm#editor@~1.0.0" could be deduped from "1.0.0" to "[email protected]"
warning "npm-shrinkwrap#npm#fs-vacuum@~1.2.9" could be deduped from "1.2.9" to "[email protected]"
warning "npm-shrinkwrap#npm#fs-write-stream-atomic@~1.0.8" could be deduped from "1.0.8" to "[email protected]"
warning "npm-shrinkwrap#npm#fstream@~1.0.10" could be deduped from "1.0.10" to "[email protected]"
warning "npm-shrinkwrap#npm#fstream-npm@~1.1.1" could be deduped from "1.1.1" to "[email protected]"
warning "npm-shrinkwrap#npm#github-url-from-git@~1.4.0" could be deduped from "1.4.0" to "[email protected]"
warning "npm-shrinkwrap#npm#github-url-from-username-repo@~1.0.2" could be deduped from "1.0.2" to "[email protected]"
warning "npm-shrinkwrap#npm#graceful-fs@~4.1.6" could be deduped from "4.1.11" to "[email protected]"
warning "npm-shrinkwrap#npm#hosted-git-info@~2.1.5" could be deduped from "2.1.5" to "[email protected]"
warning "npm-shrinkwrap#npm#inflight@~1.0.4" could be deduped from "1.0.6" to "[email protected]"
warning "npm-shrinkwrap#npm#inherits@~2.0.3" could be deduped from "2.0.3" to "[email protected]"
warning "npm-shrinkwrap#npm#ini@~1.3.4" could be deduped from "1.3.4" to "[email protected]"
warning "npm-shrinkwrap#npm#init-package-json@~1.9.4" could be deduped from "1.9.4" to "[email protected]"
warning "npm-shrinkwrap#npm#lockfile@~1.0.1" could be deduped from "1.0.3" to "[email protected]"
warning "npm-shrinkwrap#npm#lru-cache@~4.0.1" could be deduped from "4.0.2" to "[email protected]"
warning "npm-shrinkwrap#npm#minimatch@~3.0.3" could be deduped from "3.0.3" to "[email protected]"
warning "npm-shrinkwrap#npm#mkdirp@~0.5.1" could be deduped from "0.5.1" to "[email protected]"
warning "npm-shrinkwrap#npm#node-gyp@~3.4.0" could be deduped from "3.4.0" to "[email protected]"
warning "npm-shrinkwrap#npm#nopt@~3.0.6" could be deduped from "3.0.6" to "[email protected]"
warning "npm-shrinkwrap#npm#normalize-git-url@~3.0.2" could be deduped from "3.0.2" to "[email protected]"
warning "npm-shrinkwrap#npm#normalize-package-data@~2.3.5" could be deduped from "2.3.5" to "[email protected]"
warning "npm-shrinkwrap#npm#npm-cache-filename@~1.0.2" could be deduped from "1.0.2" to "[email protected]"
warning "npm-shrinkwrap#npm#npm-install-checks@~1.0.7" could be deduped from "1.0.7" to "[email protected]"
warning "npm-shrinkwrap#npm#npm-package-arg@~4.1.0" could be deduped from "4.1.1" to "[email protected]"
warning "npm-shrinkwrap#npm#npm-registry-client@~7.2.1" could be deduped from "7.2.1" to "[email protected]"
warning "npm-shrinkwrap#npm#npm-user-validate@~0.1.5" could be deduped from "0.1.5" to "[email protected]"
warning "npm-shrinkwrap#npm#npmlog@~2.0.4" could be deduped from "2.0.4" to "[email protected]"
warning "npm-shrinkwrap#npm#once@~1.4.0" could be deduped from "1.4.0" to "[email protected]"
warning "npm-shrinkwrap#npm#opener@~1.4.1" could be deduped from "1.4.3" to "[email protected]"
warning "npm-shrinkwrap#npm#osenv@~0.1.3" could be deduped from "0.1.4" to "[email protected]"
warning "npm-shrinkwrap#npm#path-is-inside@~1.0.0" could be deduped from "1.0.2" to "[email protected]"
warning "npm-shrinkwrap#npm#read@~1.0.7" could be deduped from "1.0.7" to "[email protected]"
warning "npm-shrinkwrap#npm#read-installed@~4.0.3" could be deduped from "4.0.3" to "[email protected]"
warning "npm-shrinkwrap#npm#read-package-json@~2.0.4" could be deduped from "2.0.4" to "[email protected]"
warning "npm-shrinkwrap#npm#realize-package-specifier@~3.0.1" could be deduped from "3.0.3" to "[email protected]"
warning "npm-shrinkwrap#npm#retry@~0.10.0" could be deduped from "0.10.1" to "[email protected]"
warning "npm-shrinkwrap#npm#sha@~2.0.1" could be deduped from "2.0.1" to "[email protected]"
warning "npm-shrinkwrap#npm#slide@~1.1.6" could be deduped from "1.1.6" to "[email protected]"
warning "npm-shrinkwrap#npm#spdx-license-ids@~1.2.2" could be deduped from "1.2.2" to "[email protected]"
warning "npm-shrinkwrap#npm#strip-ansi@~3.0.1" could be deduped from "3.0.1" to "[email protected]"
warning "npm-shrinkwrap#npm#tar@~2.2.1" could be deduped from "2.2.1" to "[email protected]"
warning "npm-shrinkwrap#npm#text-table@~0.2.0" could be deduped from "0.2.0" to "[email protected]"
warning "npm-shrinkwrap#npm#[email protected]" could be deduped from "0.0.6" to "[email protected]"
warning "npm-shrinkwrap#npm#umask@~1.1.0" could be deduped from "1.1.0" to "[email protected]"
warning "npm-shrinkwrap#npm#validate-npm-package-license@~3.0.1" could be deduped from "3.0.1" to "[email protected]"
warning "npm-shrinkwrap#npm#validate-npm-package-name@~2.2.2" could be deduped from "2.2.2" to "[email protected]"
warning "npm-shrinkwrap#npm#which@~1.2.11" could be deduped from "1.2.12" to "[email protected]"
warning "npm-shrinkwrap#npm#wrappy@~1.0.2" could be deduped from "1.0.2" to "[email protected]"
warning "npm-shrinkwrap#npm#write-file-atomic@~1.1.4" could be deduped from "1.1.4" to "[email protected]"
warning "pouchdb#readable-stream#inherits@~2.0.1" could be deduped from "2.0.3" to "[email protected]"
error "concat-stream#readable-stream" not installed
warning "through2#readable-stream#inherits@~2.0.1" could be deduped from "2.0.3" to "[email protected]"
warning "bl#readable-stream#inherits@~2.0.1" could be deduped from "2.0.3" to "[email protected]"
warning "browserify#stream-browserify#inherits@~2.0.1" could be deduped from "2.0.3" to "[email protected]"
warning "supertest#superagent#component-emitter@^1.2.0" could be deduped from "1.3.0" to "[email protected]"
error "eslint#user-home" is wrong version: expected "2.0.0", got "1.1.1"
warning "babel-generator#babel-types#to-fast-properties@^1.0.1" could be deduped from "1.0.3" to "[email protected]"
error "yargs-parser#camelcase" not installed
error "superagent#component-emitter" is wrong version: expected "1.2.1", got "1.3.0"
warning "escope#es6-map#es5-ext@~0.10.11" could be deduped from "0.10.37" to "[email protected]"
warning "escope#es6-weak-map#es5-ext@^0.10.8" could be deduped from "0.10.37" to "[email protected]"
error "find-node-modules#findup-sync" is wrong version: expected "0.4.2", got "2.0.0"
error "liftoff#flagged-respawn" is wrong version: expected "0.3.2", got "1.0.1"
warning "npm#glob#fs.realpath@^1.0.0" could be deduped from "1.0.0" to "[email protected]"
warning "npm#glob#inflight@^1.0.4" could be deduped from "1.0.6" to "[email protected]"
warning "npm#glob#inherits@2" could be deduped from "2.0.3" to "[email protected]"
warning "npm#glob#minimatch@^3.0.2" could be deduped from "3.0.3" to "[email protected]"
warning "npm#glob#once@^1.3.0" could be deduped from "1.4.0" to "[email protected]"
warning "npm#glob#path-is-absolute@^1.0.0" could be deduped from "1.0.1" to "[email protected]"
error "liftoff#lodash.mapvalues" not installed
warning "vinyl-buffer#through2#readable-stream#inherits@~2.0.1" could be deduped from "2.0.3" to "[email protected]"
warning "vinyl-source-stream#through2#readable-stream#inherits@~2.0.1" could be deduped from "2.0.3" to "[email protected]"
warning "pouchdb#through2#readable-stream#inherits@~2.0.1" could be deduped from "2.0.3" to "[email protected]"
warning "npm#readable-stream#buffer-shims@^1.0.0" could be deduped from "1.0.0" to "[email protected]"
warning "npm#readable-stream#core-util-is@~1.0.0" could be deduped from "1.0.2" to "[email protected]"
warning "npm#readable-stream#inherits@~2.0.1" could be deduped from "2.0.3" to "npm#[email protected]"
warning "npm#readable-stream#isarray@~1.0.0" could be deduped from "1.0.0" to "[email protected]"
warning "npm#readable-stream#process-nextick-args@~1.0.6" could be deduped from "1.0.7" to "[email protected]"
warning "npm#readable-stream#string_decoder@~0.10.x" could be deduped from "0.10.31" to "[email protected]"
warning "npm#readable-stream#util-deprecate@~1.0.1" could be deduped from "1.0.2" to "[email protected]"
warning "npm#request#aws-sign2@~0.6.0" could be deduped from "0.6.0" to "[email protected]"
warning "npm#request#aws4@^1.2.1" could be deduped from "1.6.0" to "[email protected]"
warning "npm#request#bl@~1.1.2" could be deduped from "1.1.2" to "[email protected]"
warning "npm#request#caseless@~0.11.0" could be deduped from "0.11.0" to "[email protected]"
warning "npm#request#combined-stream@~1.0.5" could be deduped from "1.0.5" to "[email protected]"
warning "npm#request#extend@~3.0.0" could be deduped from "3.0.0" to "[email protected]"
warning "npm#request#forever-agent@~0.6.1" could be deduped from "0.6.1" to "[email protected]"
warning "npm#request#form-data@~1.0.0-rc4" could be deduped from "1.0.1" to "npm#[email protected]"
warning "npm#request#har-validator@~2.0.6" could be deduped from "2.0.6" to "[email protected]"
warning "npm#request#hawk@~3.1.3" could be deduped from "3.1.3" to "[email protected]"
warning "npm#request#http-signature@~1.1.0" could be deduped from "1.1.1" to "[email protected]"
warning "npm#request#is-typedarray@~1.0.0" could be deduped from "1.0.0" to "[email protected]"
warning "npm#request#isstream@~0.1.2" could be deduped from "0.1.2" to "[email protected]"
warning "npm#request#json-stringify-safe@~5.0.1" could be deduped from "5.0.1" to "[email protected]"
warning "npm#request#mime-types@~2.1.7" could be deduped from "2.1.14" to "[email protected]"
warning "npm#request#node-uuid@~1.4.7" could be deduped from "1.4.7" to "[email protected]"
warning "npm#request#oauth-sign@~0.8.1" could be deduped from "0.8.2" to "[email protected]"
warning "npm#request#qs@~6.2.0" could be deduped from "6.2.2" to "npm#[email protected]"
warning "npm#request#stringstream@~0.0.4" could be deduped from "0.0.5" to "[email protected]"
warning "npm#request#tough-cookie@~2.3.0" could be deduped from "2.3.2" to "[email protected]"
warning "npm#request#tunnel-agent@~0.4.1" could be deduped from "0.4.3" to "[email protected]"
error "orchestrator#stream-consume" is wrong version: expected "0.1.0", got "0.1.1"
error "v8flags#user-home" not installed
error "micromatch#arr-diff" is wrong version: expected "2.0.0", got "4.0.0"
error "micromatch#array-unique" is wrong version: expected "0.2.1", got "0.3.2"
error "npm-registry-client#concat-stream" not installed
error "findup-sync#detect-file" is wrong version: expected "0.1.0", got "1.0.0"
warning "es6-map#es6-set#es5-ext@~0.10.11" could be deduped from "0.10.37" to "[email protected]"
error "rename-function-calls#detective#esprima-fb" is wrong version: expected "3001.1.0-dev-harmony-fb", got null
warning "npm#rimraf#glob#inflight@^1.0.4" could be deduped from "1.0.6" to "[email protected]"
warning "npm#rimraf#glob#inherits@2" could be deduped from "2.0.3" to "[email protected]"
warning "npm#rimraf#glob#minimatch@^3.0.2" could be deduped from "3.0.3" to "[email protected]"
warning "npm#rimraf#glob#once@^1.3.0" could be deduped from "1.4.0" to "[email protected]"
error "vinyl-fs#graceful-fs#natives" is wrong version: expected "1.1.0", got "1.1.6"
warning "vinyl-fs#through2#readable-stream#inherits@~2.0.1" could be deduped from "2.0.3" to "[email protected]"
warning "exposify#through2#readable-stream#inherits@~2.0.1" could be deduped from "2.0.3" to "[email protected]"
warning "transformify#readable-stream#inherits@~2.0.1" could be deduped from "2.0.3" to "[email protected]"
error "findup-sync#resolve-dir" is wrong version: expected "0.1.1", got "1.0.1"
error "object.omit#for-own" is wrong version: expected "0.1.5", got "1.0.0"
error "resolve-dir#global-modules" is wrong version: expected "0.2.3", got "1.0.0"
error "parse-filepath#is-absolute" is wrong version: expected "0.2.6", got "1.0.0"
warning "glob-stream#through2#readable-stream#inherits@~2.0.1" could be deduped from "2.0.3" to "[email protected]"
warning "multipipe#duplexer2#readable-stream#inherits@~2.0.1" could be deduped from "2.0.3" to "[email protected]"
error "global-modules#global-prefix" is wrong version: expected "0.1.5", got "1.0.2"
error "is-absolute#is-relative" is wrong version: expected "0.2.1", got "1.0.0"
error "global-modules#is-windows" is wrong version: expected "0.2.0", got "1.0.2"
error "global-prefix#homedir-polyfill" is wrong version: expected "1.0.1", got "1.0.3"
error "fill-range#is-number" is wrong version: expected "2.1.0", got "3.0.0"
error "is-relative#is-unc-path" is wrong version: expected "0.1.2", got "1.0.0"
error "fill-range#isobject" is wrong version: expected "2.1.0", got "3.0.1"
info Found 129 warnings.
error Found 36 errors.
info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.

@danstoner
Copy link
Contributor Author

Starting with a working idb-portal...

  1. Run 'yarn start' and it works, sorting is available.
  2. Run 'yarn' by itself (output below), and then 'yarn start'... and sorting is now broken.
  3. Observe that there are no changes to package.json or yarn.lock.

yarn output:

yarn install v1.16.0
[1/6] Validating package.json...
[2/6] Resolving packages...
[3/6] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/6] Linking dependencies...
[5/6] Building fresh packages...
[6/6] Cleaning modules...
$ ./postinstall.sh
+++++++++++++ BEGIN POSTINSTALL +++++++++++++
[10:25:29] Using gulpfile ~/git/STAGING/FUTZ/idb-portal-chuckered/gulpfile.js
[10:25:29] Starting 'build'...
[10:25:32] Finished 'build' after 2.76 s
[10:25:33] Using gulpfile ~/git/STAGING/FUTZ/idb-portal-chuckered/gulpfile.js
[10:25:33] Starting 'buildLess'...
[10:25:33] Starting 'client'...
[10:25:33] Starting 'mapper'...
[10:25:33] Starting 'libs'...
[10:25:33] Starting 'leaflet-extra'...
[10:25:33] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/leaflet/dist/images/marker-icon-2x.png" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/leaflet/dist/images/marker-icon-2x.png"
[10:25:33] Finished 'leaflet-extra' after 2.41 ms
[10:25:38] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/leaflet/dist/images/layers.png" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/leaflet/dist/images/layers.png"
[10:25:38] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/leaflet/dist/images/layers-2x.png" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/leaflet/dist/images/layers-2x.png"
[10:25:38] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/leaflet/dist/images/marker-icon.png" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/leaflet/dist/images/marker-icon.png"
[10:25:38] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/jquery-ui/themes/base/images/ui-icons_444444_256x240.png" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/jquery-ui/themes/base/images/ui-icons_444444_256x240.png"
[10:25:38] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/jquery-ui/themes/base/images/ui-icons_444444_256x240.png" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/jquery-ui/themes/base/images/ui-icons_444444_256x240.png"
[10:25:38] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/jquery-ui/themes/base/images/ui-icons_555555_256x240.png" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/jquery-ui/themes/base/images/ui-icons_555555_256x240.png"
[10:25:38] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/jquery-ui/themes/base/images/ui-icons_ffffff_256x240.png" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/jquery-ui/themes/base/images/ui-icons_ffffff_256x240.png"
[10:25:38] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/jquery-ui/themes/base/images/ui-icons_777620_256x240.png" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/jquery-ui/themes/base/images/ui-icons_777620_256x240.png"
[10:25:38] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/jquery-ui/themes/base/images/ui-icons_cc0000_256x240.png" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/jquery-ui/themes/base/images/ui-icons_cc0000_256x240.png"
[10:25:38] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/jquery-ui/themes/base/images/ui-icons_777777_256x240.png" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/jquery-ui/themes/base/images/ui-icons_777777_256x240.png"
[10:25:38] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.eot" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/bootstrap/dist/fonts/glyphicons-halflings-regular.eot"
[10:25:38] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.eot" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/bootstrap/dist/fonts/glyphicons-halflings-regular.eot"
[10:25:38] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2"
[10:25:38] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.woff" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/bootstrap/dist/fonts/glyphicons-halflings-regular.woff"
[10:25:38] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf"
[10:25:38] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.svg" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/bootstrap/dist/fonts/glyphicons-halflings-regular.svg"
[10:25:39] Finished 'buildLess' after 6.01 s
[10:25:42] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/@bower_components/leaflet.fullscreen/icon-fullscreen.png" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/@bower_components/leaflet.fullscreen/icon-fullscreen.png"
[10:25:42] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/@bower_components/leaflet.fullscreen/icon-fullscreen-2x.png" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/@bower_components/leaflet.fullscreen/icon-fullscreen-2x.png"
[10:25:42] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/leaflet-draw/dist/images/spritesheet.png" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/leaflet-draw/dist/images/spritesheet.png"
[10:25:42] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/leaflet-draw/dist/images/spritesheet.svg" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/leaflet-draw/dist/images/spritesheet.svg"
[10:25:42] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/leaflet-draw/dist/images/spritesheet-2x.png" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/leaflet-draw/dist/images/spritesheet-2x.png"
[10:25:42] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/leaflet-draw/dist/images/spritesheet.svg" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/leaflet-draw/dist/images/spritesheet.svg"
[10:25:42] Finished 'libs' after 8.83 s
[10:25:42] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/leaflet/dist/images/marker-icon.png" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/leaflet/dist/images/marker-icon.png"
[10:25:42] Copying file from "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/node_modules/leaflet/dist/images/marker-shadow.png" to "/home/dan/git/STAGING/FUTZ/idb-portal-chuckered/public/vendor/leaflet/dist/images/marker-shadow.png"
[10:25:52] Finished 'mapper' after 19 s
[10:25:54] Finished 'client' after 21 s
[10:25:54] Starting 'default'...
[10:25:54] Finished 'default' after 51 μs
+++++++++++++ END POSTINSTALL +++++++++++++
Done in 39.49s.

@danstoner
Copy link
Contributor Author

danstoner commented Jun 9, 2019

Run yarn check and capture output, then yarn, then yarn check again and capture output...

yarn command with no args is making changes (or is it gulp? or the postinstall script?).

diff:

$ diff yarn.check.txt yarn.check.after_yarnbreak.txt
...
< error "is-absolute#is-relative" is wrong version: expected "0.2.1", got "1.0.0"
< error "global-modules#is-windows" is wrong version: expected "0.2.0", got "1.0.2"
< error "global-prefix#homedir-polyfill" is wrong version: expected "1.0.1", got "1.0.3"
< error "fill-range#is-number" is wrong version: expected "2.1.0", got "3.0.0"
< error "is-relative#is-unc-path" is wrong version: expected "0.1.2", got "1.0.0"
< error "fill-range#isobject" is wrong version: expected "2.1.0", got "3.0.1"
< info Found 129 warnings.
< error Found 36 errors.
---
> info Found 131 warnings.
> error Found 5 errors.

yarn is "fixing" 30+ errors which seems to break tablesorter.

@danstoner
Copy link
Contributor Author

yarn.install.verbose.log
attached verbose capture of yarn install --verbose during transition of "sorting works" to "sorting stops working, tablesorter issue"

@wilsotc
Copy link
Contributor

wilsotc commented Jun 11, 2019 via email

@wilsotc
Copy link
Contributor

wilsotc commented Jun 11, 2019 via email

@nrejac
Copy link
Contributor

nrejac commented May 27, 2020

Did this ever make it into the production code? It seems to still be a problem.

@wilsotc
Copy link
Contributor

wilsotc commented May 27, 2020

The portal javascript call stack is so polluted I have been unable to find the source of this issue.

@danstoner
Copy link
Contributor Author

Chris wrote in internal Slack channel:

At the time the https://portal.idigbio.org/portal/publishers table gets initialized for sorting via:

],function(error){
    ReactDOM.render(
      <Page/>,
      document.getElementById('main')
    );  
    $('.datatable').tablesorter();
})

There isn't a table there to sort

So ya get:

publishers.js:330 Uncaught TypeError: $(...).tablesorter is not a function
    at publishers.js:330:21
    at async.js:3694:1
    at async.js:359:1
    at iteratorCallback (async.js:935:1)
    at async.js:843:1
    at async.js:3691:1
    at apply (async.js:21:1)
    at async.js:56:1
    at publishers.js:298:7
    at Request.cb [as _callback] (idbapi.js:71:25)

Moving $('.datatable').tablesorter(); to $(document).ready() would work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants