pendulum-chain / pendulum-webapp

Repository for the testnet prototype of the Pendulum web application
GNU General Public License v3.0
1 stars 0 forks source link

build issues #56

Open bernardoaraujor opened 2 years ago

bernardoaraujor commented 2 years ago

I'm trying to test this project as part of the MS1 review. I'm on Ubuntu 20 and I'm running into compilation issues (main branch).

When running yarn:

$ yarn
yarn install v1.22.18
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@emotion/styled > @emotion/babel-plugin@11.3.0" has unmet peer dependency "@babel/core@^7.0.0".
warning "@emotion/styled > @emotion/babel-plugin > @babel/plugin-syntax-jsx@7.12.13" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > @polkadot/util-crypto@8.4.1" has unmet peer dependency "@polkadot/util@8.4.1".
warning " > @polkadot/ui-settings@1.1.1" has unmet peer dependency "@polkadot/networks@*".
warning " > @polkadot/ui-settings@1.1.1" has unmet peer dependency "@polkadot/util@*".
warning "react-scripts > tailwindcss@3.0.23" has unmet peer dependency "autoprefixer@^10.0.2".
warning "react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-syntax-flow@^7.14.5".
warning "react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-transform-react-jsx@^7.14.9".
[4/4] Building fresh packages...
[-/6] ⠠ waiting...
[-/6] ⠠ waiting...
[-/6] ⠠ waiting...
[-/6] ⠠ waiting...
warning Error running install script for optional dependency: "/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/sodium-native: Command failed.
Exit code: 1
Command: node-gyp-build \"node preinstall.js\" \"node postinstall.js\"
Arguments: 
Directory: /home/bear/develop/ms_reviews/pendulum-webapp/node_modules/sodium-native
Output:
libtool is required, but wasn't found on this system
./configure: 5: ./configure: not found
/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/sodium-native/preinstall.js:119
    if (err) throw err
             ^

Error: ./configure exited with 127
    at ChildProcess.<anonymous> (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/sodium-native/preinstall.js:149:25)
    at ChildProcess.emit (node:events:527:28)
$ husky install
husky - Git hooks installed
Done in 19.80s

when running yarn build:

$ yarn build
yarn run v1.22.18
$ craco build && cp -R _redirects build/_redirects
Creating an optimized production build...
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
Failed to compile.

Error: error:0308010C:digital envelope routines::unsupported
    at String.replace (<anonymous>)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
bernardoaraujor commented 2 years ago

looks like I was missing libtool.

it might be a good idea to document that as a dependency?

anyways, it didn't help much... also, when running yarn start:

Failed to compile.

Error: error:0308010C:digital envelope routines::unsupported
    at String.replace (<anonymous>)
assets by path static/media/*.woff2 259 KiB
  asset static/media/roboto-latin-500-normal.869888415d0b1a99ae5c.woff2 15.5 KiB [emitted] [immutable] [from: node_modules/@fontsource/roboto/files/roboto-latin-500-normal.woff2] (auxiliary name: main)
  + 27 assets
assets by path static/media/*.cjs 5.59 KiB
  asset static/media/node.c04e604af5540eafef82.cjs 1.42 KiB [emitted] [immutable] [from: node_modules/@polkadot/x-textencoder/node.cjs] (auxiliary name: main)
  + 6 assets
assets by path static/media/*.woff 255 KiB
  asset static/media/roboto-all-500-normal.52cb737b682eb9661ee1.woff 64 KiB [emitted] [immutable] [from: node_modules/@fontsource/roboto/files/roboto-all-500-normal.woff] (auxiliary name: main)
  + 3 assets
assets by path static/js/*.js 7.88 MiB
  asset static/js/bundle.js 7.87 MiB [emitted] (name: main) 1 related asset
  asset static/js/node_modules_web-vitals_dist_web-vitals_js.chunk.js 6.51 KiB [emitted] 1 related asset
asset static/media/disconnected.03b2f5d9a6596c22f8d6.png 49 KiB [emitted] [immutable] [from: src/assets/disconnected.png] (auxiliary name: main)
asset asset-manifest.json 4.53 KiB [emitted]
asset index.html 1.63 KiB [emitted]
orphan modules 6.47 MiB (javascript) 6.46 KiB (asset) [orphan] 9926 modules
runtime modules 31.5 KiB 16 modules
cacheable modules 5.77 MiB (javascript) 569 KiB (asset)
  modules by path ./node_modules/ 5.58 MiB (javascript) 520 KiB (asset)
    javascript modules 5.57 MiB 1621 modules
    asset modules 1.64 KiB (javascript) 520 KiB (asset) 40 modules
    ./node_modules/stellar-sdk/package.json 3.26 KiB [built] [code generated]
  modules by path ./src/ 196 KiB (javascript) 49 KiB (asset)
    javascript modules 186 KiB 42 modules
    ./src/contracts/amm-metadata.json 9.9 KiB [built] [code generated]
    ./src/assets/disconnected.png 42 bytes (javascript) 49 KiB (asset) [built] [code generated]
  optional modules 30 bytes [optional]
    buffer (ignored) 15 bytes [optional] [built] [code generated]
    sodium-native (ignored) 15 bytes [optional] [built] [code generated]
  + 6 modules

ERROR in ./src/assets/font-awesome-icons/discord-brands.svg
Module build failed (from ./node_modules/file-loader/dist/cjs.js):
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:135:10)
    at getHashDigest (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/loader-utils/lib/getHashDigest.js:46:34)
    at /home/bear/develop/ms_reviews/pendulum-webapp/node_modules/loader-utils/lib/interpolateName.js:113:11
    at String.replace (<anonymous>)
    at interpolateName (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/loader-utils/lib/interpolateName.js:110:8)
    at Object.loader (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/file-loader/dist/index.js:29:48)
 @ ./src/components/Footer.tsx 9:0-95 39:56-66
 @ ./src/App.tsx 11:0-41 27:39-45
 @ ./src/index.tsx 7:0-24 34:35-38

ERROR in ./src/assets/font-awesome-icons/envelope-open-text-solid.svg
Module build failed (from ./node_modules/file-loader/dist/cjs.js):
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:135:10)
    at getHashDigest (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/loader-utils/lib/getHashDigest.js:46:34)
    at /home/bear/develop/ms_reviews/pendulum-webapp/node_modules/loader-utils/lib/interpolateName.js:113:11
    at String.replace (<anonymous>)
    at interpolateName (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/loader-utils/lib/interpolateName.js:110:8)
    at Object.loader (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/file-loader/dist/index.js:29:48)
 @ ./src/components/Footer.tsx 10:0-106 33:57-68
 @ ./src/App.tsx 11:0-41 27:39-45
 @ ./src/index.tsx 7:0-24 34:35-38

ERROR in ./src/assets/font-awesome-icons/medium-brands.svg
Module build failed (from ./node_modules/file-loader/dist/cjs.js):
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:135:10)
    at getHashDigest (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/loader-utils/lib/getHashDigest.js:46:34)
    at /home/bear/develop/ms_reviews/pendulum-webapp/node_modules/loader-utils/lib/interpolateName.js:113:11
    at String.replace (<anonymous>)
    at interpolateName (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/loader-utils/lib/interpolateName.js:110:8)
    at Object.loader (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/file-loader/dist/index.js:29:48)
 @ ./src/components/Footer.tsx 11:0-93 15:55-64
 @ ./src/App.tsx 11:0-41 27:39-45
 @ ./src/index.tsx 7:0-24 34:35-38

ERROR in ./src/assets/font-awesome-icons/telegram-brands.svg
Module build failed (from ./node_modules/file-loader/dist/cjs.js):
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:135:10)
    at getHashDigest (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/loader-utils/lib/getHashDigest.js:46:34)
    at /home/bear/develop/ms_reviews/pendulum-webapp/node_modules/loader-utils/lib/interpolateName.js:113:11
    at String.replace (<anonymous>)
    at interpolateName (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/loader-utils/lib/interpolateName.js:110:8)
    at Object.loader (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/file-loader/dist/index.js:29:48)
 @ ./src/components/Footer.tsx 12:0-97 27:57-68
 @ ./src/App.tsx 11:0-41 27:39-45
 @ ./src/index.tsx 7:0-24 34:35-38

ERROR in ./src/assets/font-awesome-icons/twitter-brands.svg
Module build failed (from ./node_modules/file-loader/dist/cjs.js):
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:135:10)
    at getHashDigest (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/loader-utils/lib/getHashDigest.js:46:34)
    at /home/bear/develop/ms_reviews/pendulum-webapp/node_modules/loader-utils/lib/interpolateName.js:113:11
    at String.replace (<anonymous>)
    at interpolateName (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/loader-utils/lib/interpolateName.js:110:8)
    at Object.loader (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/file-loader/dist/index.js:29:48)
 @ ./src/components/Footer.tsx 13:0-95 21:56-66
 @ ./src/App.tsx 11:0-41 27:39-45
 @ ./src/index.tsx 7:0-24 34:35-38

ERROR in ./src/assets/logo.svg
Module build failed (from ./node_modules/file-loader/dist/cjs.js):
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:135:10)
    at getHashDigest (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/loader-utils/lib/getHashDigest.js:46:34)
    at /home/bear/develop/ms_reviews/pendulum-webapp/node_modules/loader-utils/lib/interpolateName.js:113:11
    at String.replace (<anonymous>)
    at interpolateName (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/loader-utils/lib/interpolateName.js:110:8)
    at Object.loader (/home/bear/develop/ms_reviews/pendulum-webapp/node_modules/file-loader/dist/index.js:29:48)
 @ ./src/components/Topbar.tsx 15:0-38 62:15-19
 @ ./src/Main.tsx 13:0-41 33:37-43
 @ ./src/App.tsx 13:0-33 23:40-51
 @ ./src/index.tsx 7:0-24 34:35-38

webpack 5.69.0 compiled with 6 errors in 43857 ms
No issues found.
gonzamontiel commented 2 years ago

Hi @bernardoaraujor, I'm sorry you found issues while building the repo.

According to this thread, I see that the latest error has to do with a Node.js version 17, I think that we might be using version 16 in which we never saw the error. While we work on a fix, could you please try running?

export NODE_OPTIONS=--openssl-legacy-provider && yarn install

Alternatively, you could also test it with Node v16.

Regarding the libtool external dependency, I will add it to the README.

EDIT: README updated.