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

Experiment with light-client in docusaurus #6575

Open
jeluard opened this issue Mar 21, 2024 · 1 comment
Open

Experiment with light-client in docusaurus #6575

jeluard opened this issue Mar 21, 2024 · 1 comment
Labels
scope-documentation All issues related to the Lodestar documentation. scope-light-clients All issues regarding light client development.

Comments

@jeluard
Copy link
Member

jeluard commented Mar 21, 2024

Using light-client with docusaurus triggers a number of errors. While it might be doable to tweak webpack configuration to overcome those, it looks worth looking at tackling those individually to improve end-user experience.

What can be done

Errors

Module not found: Error: Can't resolve 'crypto' in '/Users/julien/Documents/Projects/jeluard/lodestar/docs/node_modules/bls-eth-wasm/src'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
        - install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "crypto": false }

--------------------------

Module not found: Error: Can't resolve 'https' in '/Users/julien/Documents/Projects/jeluard/lodestar/docs/node_modules/eventsource/lib'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "https": require.resolve("https-browserify") }'
        - install 'https-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "https": false }

--------------------------

Module not found: Error: Can't resolve 'http' in '/Users/julien/Documents/Projects/jeluard/lodestar/docs/node_modules/eventsource/lib'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
        - install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "http": false }

--------------------------

Module not found: Error: Can't resolve 'crypto' in '/Users/julien/Documents/Projects/jeluard/lodestar/node_modules/@chainsafe/blst/dist'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
        - install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "crypto": false }

--------------------------

Module not found: Error: Can't resolve 'fs' in '/Users/julien/Documents/Projects/jeluard/lodestar/node_modules/@chainsafe/blst/dist/scripts'

--------------------------

Module not found: Error: Can't resolve 'path' in '/Users/julien/Documents/Projects/jeluard/lodestar/node_modules/@chainsafe/blst/dist/scripts'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
        - install 'path-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "path": false }

--------------------------

Module not found: Error: Can't resolve 'crypto' in '/Users/julien/Documents/Projects/jeluard/lodestar/docs/node_modules/@chainsafe/bls/lib/blst-native'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
        - install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "crypto": false }
@jeluard jeluard mentioned this issue Mar 21, 2024
8 tasks
@philknows philknows added scope-documentation All issues related to the Lodestar documentation. scope-light-clients All issues regarding light client development. labels Mar 27, 2024
@jeluard
Copy link
Member Author

jeluard commented Apr 3, 2024

Progress can be tracked here.

Currently blocked by facebook/docusaurus#10010

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope-documentation All issues related to the Lodestar documentation. scope-light-clients All issues regarding light client development.
Projects
None yet
Development

No branches or pull requests

2 participants