fireproof-storage / fireproof-alpha

🔥 Cloudless realtime database
https://fireproof.storage
Other
81 stars 4 forks source link

build polyfills into dist #96

Closed jchris closed 1 year ago

jchris commented 1 year ago

This is from a new create-react-app

ERROR in ./node_modules/js-crypto-env/dist/index.js 19:16-33
Module not found: Error: Can't resolve 'crypto' in '/Users/jchris/my-app/node_modules/js-crypto-env/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 }
ERROR in ./node_modules/encrypted-block/esm/index.js 1:0-37
Module not found: Error: Can't resolve 'crypto' in '/Users/jchris/my-app/node_modules/encrypted-block/esm'

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 }
Screen Shot 2023-05-04 at 9 41 16 AM
jchris commented 1 year ago

fixed in 6d480b1697b4d58d5f00ce06685f46f05c8ed79e