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

Cannot run RAWGraph locally #397

Open
haoshuai999 opened this issue Jan 16, 2024 · 4 comments
Open

Cannot run RAWGraph locally #397

haoshuai999 opened this issue Jan 16, 2024 · 4 comments

Comments

@haoshuai999
Copy link

As I data viz fan, I always like RAWGraph. I prefer downloading the whole repository and run the application locally. However, I followed the instructions on README.md by cloning the repository and running yarn install in the subfolder. Then when I run yarn start, I see the following errors:

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:68:19)
    at Object.createHash (node:crypto:138:10)
    at module.exports (/Users/shuaihao/Documents/Personal Website/rawgraphs-app/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/shuaihao/Documents/Personal Website/rawgraphs-app/node_modules/webpack/lib/NormalModule.js:417:16)
    at /Users/shuaihao/Documents/Personal Website/rawgraphs-app/node_modules/webpack/lib/NormalModule.js:452:10
    at /Users/shuaihao/Documents/Personal Website/rawgraphs-app/node_modules/webpack/lib/NormalModule.js:323:13
    at /Users/shuaihao/Documents/Personal Website/rawgraphs-app/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /Users/shuaihao/Documents/Personal Website/rawgraphs-app/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/Users/shuaihao/Documents/Personal Website/rawgraphs-app/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /Users/shuaihao/Documents/Personal Website/rawgraphs-app/node_modules/react-scripts/node_modules/babel-loader/lib/index.js:59:103 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v20.10.0
error Command failed with exit code 1.

As indicated in the error:
Node version: v20.10.0
Yarn version: v1.22.21

I would like to know what I did wrongly here and why I cannot run the application locally.

@mikima
Copy link
Member

mikima commented Jan 24, 2024

Just tested, same error:

Starting the development server...

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:68:19)
    at Object.createHash (node:crypto:138:10)
    at module.exports (/Users/michelemauri/Desktop/rawtest/rawgraphs-app/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/michelemauri/Desktop/rawtest/rawgraphs-app/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/Users/michelemauri/Desktop/rawtest/rawgraphs-app/node_modules/webpack/lib/NormalModule.js:471:10)
    at /Users/michelemauri/Desktop/rawtest/rawgraphs-app/node_modules/webpack/lib/NormalModule.js:503:5
    at /Users/michelemauri/Desktop/rawtest/rawgraphs-app/node_modules/webpack/lib/NormalModule.js:358:12
    at /Users/michelemauri/Desktop/rawtest/rawgraphs-app/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/Users/michelemauri/Desktop/rawtest/rawgraphs-app/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/Users/michelemauri/Desktop/rawtest/rawgraphs-app/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
/Users/michelemauri/Desktop/rawtest/rawgraphs-app/node_modules/react-scripts/scripts/start.js:19
  throw err;
  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:68:19)
    at Object.createHash (node:crypto:138:10)
    at module.exports (/Users/michelemauri/Desktop/rawtest/rawgraphs-app/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/michelemauri/Desktop/rawtest/rawgraphs-app/node_modules/webpack/lib/NormalModule.js:417:16)
    at /Users/michelemauri/Desktop/rawtest/rawgraphs-app/node_modules/webpack/lib/NormalModule.js:452:10
    at /Users/michelemauri/Desktop/rawtest/rawgraphs-app/node_modules/webpack/lib/NormalModule.js:323:13
    at /Users/michelemauri/Desktop/rawtest/rawgraphs-app/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /Users/michelemauri/Desktop/rawtest/rawgraphs-app/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/Users/michelemauri/Desktop/rawtest/rawgraphs-app/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /Users/michelemauri/Desktop/rawtest/rawgraphs-app/node_modules/react-scripts/node_modules/babel-loader/lib/index.js:59:103 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

could it be related to node version?

@mikima mikima added the bug label Jan 24, 2024
@mikima
Copy link
Member

mikima commented Jan 26, 2024

@haoshuai999 it should be fixed now, could you please test it?

It turns out that is related to the node update of openssl version. I solved it with commit 0283bf3 by adding --openssl-legacy-provider. @bianchimro do you know if there is a better solution?

I leave the issue open for further discussion

@haoshuai999
Copy link
Author

haoshuai999 commented Jan 26, 2024

@mikima I am able to run the application successfully on my machine now. The only extra command I had to run between yarn install and yarn start is npx browserslist@latest --update-db. For some reason, the package is outdated.

@haoshuai999
Copy link
Author

@mikima I would suggest you add --openssl-legacy-provider to the build script as well, because you will see the same error when you run yarn build right now.

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

No branches or pull requests

2 participants