Closed pwdel closed 6 months ago
Note this package is around 4 years old so it might be out of date.
Got the following when attempting to install on frontend when logged into container.
root@c389ddce6be4:/app# npm install blk-design-system-react
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-datetime@3.0.4
npm WARN Found: react@17.0.1
npm WARN node_modules/blk-design-system-react/node_modules/react
npm WARN react@"17.0.1" from blk-design-system-react@1.2.0
npm WARN node_modules/blk-design-system-react
npm WARN blk-design-system-react@"*" from the root project
npm WARN 4 more (@testing-library/react, react-chartjs-2, react-dom, react-router-dom)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.5.0" from react-datetime@3.0.4
npm WARN node_modules/blk-design-system-react/node_modules/react-datetime
npm WARN react-datetime@"3.0.4" from blk-design-system-react@1.2.0
npm WARN node_modules/blk-design-system-react
npm WARN
npm WARN Conflicting peer dependency: react@16.14.0
npm WARN node_modules/react
npm WARN peer react@"^16.5.0" from react-datetime@3.0.4
npm WARN node_modules/blk-design-system-react/node_modules/react-datetime
npm WARN react-datetime@"3.0.4" from blk-design-system-react@1.2.0
npm WARN node_modules/blk-design-system-react
npm WARN deprecated rollup-plugin-terser@5.3.1: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated figgy-pudding@3.5.2: This module is no longer supported.
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated rollup-plugin-babel@4.4.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
npm WARN deprecated domexception@2.0.1: Use your platform's native DOMException instead
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated @babel/plugin-proposal-numeric-separator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
npm WARN deprecated @babel/plugin-proposal-private-methods@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead.
npm WARN deprecated @babel/plugin-proposal-optional-chaining@7.21.0: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
npm WARN deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
npm WARN deprecated @babel/plugin-proposal-nullish-coalescing-operator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated mini-create-react-context@0.4.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated workbox-google-analytics@5.1.4: It is not compatible with newer versions of GA starting with v4, as long as you are using GAv3 it should be ok, but the package is not longer being maintained
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /app/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/local/bin/node /app/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli '/usr/local/bin/node',
npm ERR! gyp verb cli '/app/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@21.0.0 | linux | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb which
failed Error: not found: python2
npm ERR! gyp verb which
failed at getNotFoundError (/app/node_modules/which/which.js:13:12)
npm ERR! gyp verb which
failed at F (/app/node_modules/which/which.js:68:19)
npm ERR! gyp verb which
failed at E (/app/node_modules/which/which.js:80:29)
npm ERR! gyp verb which
failed at /app/node_modules/which/which.js:89:16
npm ERR! gyp verb which
failed at /app/node_modules/isexe/index.js:42:5
npm ERR! gyp verb which
failed at /app/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb which
failed at FSReqCallback.oncomplete (node:fs:199:21)
npm ERR! gyp verb which
failed python2 Error: not found: python2
npm ERR! gyp verb which
failed at getNotFoundError (/app/node_modules/which/which.js:13:12)
npm ERR! gyp verb which
failed at F (/app/node_modules/which/which.js:68:19)
npm ERR! gyp verb which
failed at E (/app/node_modules/which/which.js:80:29)
npm ERR! gyp verb which
failed at /app/node_modules/which/which.js:89:16
npm ERR! gyp verb which
failed at /app/node_modules/isexe/index.js:42:5
npm ERR! gyp verb which
failed at /app/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb which
failed at FSReqCallback.oncomplete (node:fs:199:21) {
npm ERR! gyp verb which
failed code: 'ENOENT'
npm ERR! gyp verb which
failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb which
failed Error: not found: python
npm ERR! gyp verb which
failed at getNotFoundError (/app/node_modules/which/which.js:13:12)
npm ERR! gyp verb which
failed at F (/app/node_modules/which/which.js:68:19)
npm ERR! gyp verb which
failed at E (/app/node_modules/which/which.js:80:29)
npm ERR! gyp verb which
failed at /app/node_modules/which/which.js:89:16
npm ERR! gyp verb which
failed at /app/node_modules/isexe/index.js:42:5
npm ERR! gyp verb which
failed at /app/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb which
failed at FSReqCallback.oncomplete (node:fs:199:21)
npm ERR! gyp verb which
failed python Error: not found: python
npm ERR! gyp verb which
failed at getNotFoundError (/app/node_modules/which/which.js:13:12)
npm ERR! gyp verb which
failed at F (/app/node_modules/which/which.js:68:19)
npm ERR! gyp verb which
failed at E (/app/node_modules/which/which.js:80:29)
npm ERR! gyp verb which
failed at /app/node_modules/which/which.js:89:16
npm ERR! gyp verb which
failed at /app/node_modules/isexe/index.js:42:5
npm ERR! gyp verb which
failed at /app/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb which
failed at FSReqCallback.oncomplete (node:fs:199:21) {
npm ERR! gyp verb which
failed code: 'ENOENT'
npm ERR! gyp verb which
failed }
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack at PythonFinder.failNoPython (/app/node_modules/node-gyp/lib/configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.
npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-02-23T19_00_06_425Z-debug-0.log
This github repo appears to have a more modern release:
https://github.com/creativetimofficial/blk-design-system-react
Running:
root@c389ddce6be4:/app# npm install creativetimofficial/blk-design-system-react#1.2.2
Got:
npm WARN ERESOLVE overriding peer dependency npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: react-chartjs-2@2.11.2 npm WARN Found: react@18.2.0 npm WARN node_modules/react npm WARN peer react@"0.14.x || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-popper@1.3.11 npm WARN node_modules/reactstrap/node_modules/react-popper npm WARN react-popper@"^1.3.6" from reactstrap@8.10.0 npm WARN node_modules/reactstrap npm WARN npm WARN Could not resolve dependency: npm WARN peer react@"^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-chartjs-2@2.11.2 npm WARN node_modules/blk-design-system-react/node_modules/react-chartjs-2 npm WARN react-chartjs-2@"2.11.2" from blk-design-system-react@1.2.2 npm WARN node_modules/blk-design-system-react npm WARN npm WARN Conflicting peer dependency: react@17.0.2 npm WARN node_modules/react npm WARN peer react@"^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-chartjs-2@2.11.2 npm WARN node_modules/blk-design-system-react/node_modules/react-chartjs-2 npm WARN react-chartjs-2@"2.11.2" from blk-design-system-react@1.2.2 npm WARN node_modules/blk-design-system-react npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: react-chartjs-2@2.11.2 npm WARN Found: react-dom@18.2.0 npm WARN node_modules/react-dom npm WARN peer react-dom@"^18.0.0" from @testing-library/react@13.4.0 npm WARN node_modules/@testing-library/react npm WARN @testing-library/react@"^13.4.0" from the root project npm WARN 8 more (react-smooth, react-transition-group, recharts, ...) npm WARN npm WARN Could not resolve dependency: npm WARN peer react-dom@"^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-chartjs-2@2.11.2 npm WARN node_modules/blk-design-system-react/node_modules/react-chartjs-2 npm WARN react-chartjs-2@"2.11.2" from blk-design-system-react@1.2.2 npm WARN node_modules/blk-design-system-react npm WARN npm WARN Conflicting peer dependency: react-dom@17.0.2 npm WARN node_modules/react-dom npm WARN peer react-dom@"^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-chartjs-2@2.11.2 npm WARN node_modules/blk-design-system-react/node_modules/react-chartjs-2 npm WARN react-chartjs-2@"2.11.2" from blk-design-system-react@1.2.2 npm WARN node_modules/blk-design-system-react npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility npm WARN deprecated @babel/plugin-proposal-private-methods@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead. npm WARN deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead. npm WARN deprecated @babel/plugin-proposal-numeric-separator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead. npm WARN deprecated @babel/plugin-proposal-nullish-coalescing-operator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead. npm WARN deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead npm WARN deprecated @babel/plugin-proposal-optional-chaining@7.21.0: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead. npm WARN deprecated domexception@2.0.1: Use your platform's native DOMException instead npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin. npm WARN deprecated rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead npm WARN deprecated workbox-cacheable-response@6.6.0: workbox-background-sync@6.6.0 npm WARN deprecated workbox-google-analytics@6.6.0: It is not compatible with newer versions of GA starting with v4, as long as you are using GAv3 it should be ok, but the package is not longer being maintained npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x. npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
added 1330 packages, changed 15 packages, and audited 1592 packages in 1m
261 packages are looking for funding
run npm fund
for details
9 vulnerabilities (3 moderate, 6 high)
Some issues need review, and may require choosing a different dependency.
Run npm audit
for details
package.json and lockfile Updated with no breaking changes as far as I can tell.
Ok, updated with MR.
https://github.com/openpredictionmarkets/socialpredict/pull/75/files
I pulled most recent commit:
...I'm getting an error:
socialpredict-frontend-dev | 10:32:47 PM [vite] Internal server error: Failed to resolve import "reactstrap" from "src/components/navbar/NavbarLoggedOut.jsx". Does the file exist? socialpredict-frontend-dev | Plugin: vite:import-analysis socialpredict-frontend-dev | File: /app/src/components/navbar/NavbarLoggedOut.jsx:3:39 socialpredict-frontend-dev | 18 | import React, { useState, useEffect } from "react"; socialpredict-frontend-dev | 19 | import { NavLink } from "react-router-dom"; socialpredict-frontend-dev | 20 | import { Navbar, Container, Nav } from "reactstrap"; socialpredict-frontend-dev | | ^ socialpredict-frontend-dev | 21 | import "./Navbar.css"; socialpredict-frontend-dev | 22 | const NavbarLoggedOut = () => { socialpredict-frontend-dev | at formatError (file:///app/node_modules/vite/dist/node/chunks/dep-stQc5rCc.js:50500:46) socialpredict-frontend-dev | at TransformContext.error (file:///app/node_modules/vite/dist/node/chunks/dep-stQc5rCc.js:50494:19) socialpredict-frontend-dev | at normalizeUrl (file:///app/node_modules/vite/dist/node/chunks/dep-stQc5rCc.js:65562:33) socialpredict-frontend-dev | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) socialpredict-frontend-dev | at async file:///app/node_modules/vite/dist/node/chunks/dep-stQc5rCc.js:65717:47 socialpredict-frontend-dev | at async Promise.all (index 5) socialpredict-frontend-dev | at async TransformContext.transform (file:///app/node_modules/vite/dist/node/chunks/dep-stQc5rCc.js:65638:13) socialpredict-frontend-dev | at async Object.transform (file:///app/node_modules/vite/dist/node/chunks/dep-stQc5rCc.js:50809:30)
All right, it's because I forgot to rebuild frontend/ beforehand.
Now I did:
During that process I got:
And now after running ./docker-compose, I get:
socialpredict-frontend-dev | 10:54:04 PM [vite] Internal server error: Failed to resolve import "reactstrap" from "src/components/navbar/NavbarLoggedOut.jsx". Does the file exist? socialpredict-frontend-dev | Plugin: vite:import-analysis socialpredict-frontend-dev | File: /app/src/components/navbar/NavbarLoggedOut.jsx:3:39 socialpredict-frontend-dev | 18 | import React, { useState, useEffect } from "react"; socialpredict-frontend-dev | 19 | import { NavLink } from "react-router-dom"; socialpredict-frontend-dev | 20 | import { Navbar, Container, Nav } from "reactstrap"; socialpredict-frontend-dev | | ^ socialpredict-frontend-dev | 21 | import "./Navbar.css"; socialpredict-frontend-dev | 22 | const NavbarLoggedOut = () => { socialpredict-frontend-dev | at formatError (file:///app/node_modules/vite/dist/node/chunks/dep-stQc5rCc.js:50500:46) socialpredict-frontend-dev | at TransformContext.error (file:///app/node_modules/vite/dist/node/chunks/dep-stQc5rCc.js:50494:19) socialpredict-frontend-dev | at normalizeUrl (file:///app/node_modules/vite/dist/node/chunks/dep-stQc5rCc.js:65562:33) socialpredict-frontend-dev | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) socialpredict-frontend-dev | at async file:///app/node_modules/vite/dist/node/chunks/dep-stQc5rCc.js:65717:47 socialpredict-frontend-dev | at async Promise.all (index 5) socialpredict-frontend-dev | at async TransformContext.transform (file:///app/node_modules/vite/dist/node/chunks/dep-stQc5rCc.js:65638:13) socialpredict-frontend-dev | at async Object.transform (file:///app/node_modules/vite/dist/node/chunks/dep-stQc5rCc.js:50809:30) socialpredict-frontend-dev | at async loadAndTransform (file:///app/node_modules/vite/dist/node/chunks/dep-stQc5rCc.js:53582:29) socialpredict-frontend-dev | at async viteTransformMiddleware (file:///app/node_modules/vite/dist/node/chunks/dep-stQc5rCc.js:63377:32)
and:
socialpredict-frontend-dev | 10:54:03 PM [vite] Pre-transform error: Failed to resolve import "reactstrap" from "src/components/navbar/NavbarLoggedOut.jsx". Does the file exist?
I fixed it by deleting the container then running. /docker-compose again
OK, I did:
$ ./exec-frontend root@dd9fcf11400e:/app# npm install reactstrap npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: react-popper@1.3.11 npm WARN Found: react@18.2.0 npm WARN node_modules/react npm WARN peer react@">=0.14.0" from @hypnosphi/create-react-context@0.3.1 npm WARN node_modules/@hypnosphi/create-react-context npm WARN @hypnosphi/create-react-context@"^0.3.1" from react-popper@1.3.11 npm WARN node_modules/reactstrap/node_modules/react-popper npm WARN 16 more (@testing-library/react, blk-design-system-react, ...) npm WARN npm WARN Could not resolve dependency: npm WARN peer react@"0.14.x || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-popper@1.3.11 npm WARN node_modules/reactstrap/node_modules/react-popper npm WARN react-popper@"^1.3.6" from reactstrap@8.10.0 npm WARN node_modules/reactstrap npm WARN npm WARN Conflicting peer dependency: react@17.0.2 npm WARN node_modules/react npm WARN peer react@"0.14.x || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-popper@1.3.11 npm WARN node_modules/reactstrap/node_modules/react-popper npm WARN react-popper@"^1.3.6" from reactstrap@8.10.0 npm WARN node_modules/reactstrap npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
added 35 packages, removed 1 package, changed 14 packages, and audited 296 packages in 2s
55 packages are looking for funding
run npm fund
for details
found 0 vulnerabilities
And then I see a difference:
So, this seems to have automatically updated package.json and the lock file, so I pushed a new commit.
Using:
As well as associated design packages, reactstrap, classnames, etc.