felicio / status.app

https://status-app-nu.vercel.app
1 stars 0 forks source link

Resolve `Module build failed: UnhandledSchemeError: Reading from "node:zlib" is not handled by plugins (Unhandled scheme).` #1

Closed felicio closed 1 year ago

felicio commented 1 year ago
info  - Creating an optimized production build  
Failed to compile.

node:zlib
Module build failed: UnhandledSchemeError: Reading from "node:zlib" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.
    at /Users/felicio/Projects/status-im/status-app/node_modules/next/dist/compiled/webpack/bundle5.js:28:395974
    at Hook.eval [as callAsync] (eval at create (/Users/felicio/Projects/status-im/status-app/node_modules/next/dist/compiled/webpack/bundle5.js:13:28771), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/felicio/Projects/status-im/status-app/node_modules/next/dist/compiled/webpack/bundle5.js:13:25925)
    at Object.processResource (/Users/felicio/Projects/status-im/status-app/node_modules/next/dist/compiled/webpack/bundle5.js:28:395899)
    at processResource (/Users/felicio/Projects/status-im/status-app/node_modules/next/dist/compiled/webpack/bundle5.js:1:280173)
    at iteratePitchingLoaders (/Users/felicio/Projects/status-im/status-app/node_modules/next/dist/compiled/webpack/bundle5.js:1:279532)
    at runLoaders (/Users/felicio/Projects/status-im/status-app/node_modules/next/dist/compiled/webpack/bundle5.js:1:283436)
    at NormalModule._doBuild (/Users/felicio/Projects/status-im/status-app/node_modules/next/dist/compiled/webpack/bundle5.js:28:395761)
    at NormalModule.build (/Users/felicio/Projects/status-im/status-app/node_modules/next/dist/compiled/webpack/bundle5.js:28:397789)
    at /Users/felicio/Projects/status-im/status-app/node_modules/next/dist/compiled/webpack/bundle5.js:28:81243
    at NormalModule.needBuild (/Users/felicio/Projects/status-im/status-app/node_modules/next/dist/compiled/webpack/bundle5.js:28:401902)
    at Compilation._buildModule (/Users/felicio/Projects/status-im/status-app/node_modules/next/dist/compiled/webpack/bundle5.js:28:80960)
    at /Users/felicio/Projects/status-im/status-app/node_modules/next/dist/compiled/webpack/bundle5.js:28:1301554
    at Hook.eval [as callAsync] (eval at create (/Users/felicio/Projects/status-im/status-app/node_modules/next/dist/compiled/webpack/bundle5.js:13:28771), <anonymous>:6:1)
    at AsyncQueue._startProcessing (/Users/felicio/Projects/status-im/status-app/node_modules/next/dist/compiled/webpack/bundle5.js:28:1301425)
    at AsyncQueue._ensureProcessing (/Users/felicio/Projects/status-im/status-app/node_modules/next/dist/compiled/webpack/bundle5.js:28:1301274)
    at process.processImmediate (node:internal/timers:471:21)

Import trace for requested module:
node:zlib
./node_modules/@status-im/js/packages/status-js/dist/index.es.js

> Build failed because of webpack errors
felicio commented 1 year ago

@prichodko this is what I'm getting locally. Trying to deploy it on Vercel again, thus the remote dependencies on integration branch in package.json.

felicio commented 1 year ago

To repro, uncomment publicKeyToEmojiHash import.

felicio commented 1 year ago

Removing node: prefix, see https://github.com/vercel/next.js/issues/28774.