version of electron is too old to use the latest next
Expected Behavior
start dev version without error.
To Reproduce
start dev version
$ npm run dev
error occurs
(node:6688) UnhandledPromiseRejectionWarning: Error: Cannot find module 'node:stream/web'
Require stack:
- /xxx/with-electron-typescript-app/node_modules/next/dist/lib/download-wasm-swc.js
- /xxx/with-electron-typescript-app/node_modules/next/dist/build/swc/index.js
- /xxx/with-electron-typescript-app/node_modules/next/dist/build/output/store.js
- /xxx/with-electron-typescript-app/node_modules/next/dist/build/output/index.js
- /xxx/with-electron-typescript-app/node_modules/next/dist/server/dev/next-dev-server.js
- /xxx/with-electron-typescript-app/node_modules/next/dist/server/next.js
- /xxx/with-electron-typescript-app/node_modules/electron-next/index.js
- /xxx/with-electron-typescript-app/main/index.js
- /xxx/with-electron-typescript-app/node_modules/electron/dist/resources/default_app.asar/main.js
-
at Module._resolveFilename (internal/modules/cjs/loader.js:887:15)
at Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128)
at /xxx/with-electron-typescript-app/node_modules/next/dist/server/require-hook.js:180:36
at Module._load (internal/modules/cjs/loader.js:732:27)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Module.require (internal/modules/cjs/loader.js:959:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/xxx/with-electron-typescript-app/node_modules/next/dist/lib/download-wasm-swc.js:63:29)
at Module._compile (internal/modules/cjs/loader.js:1078:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
(Use `electron --trace-warnings ...` to show where the warning was created)
(node:6688) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
(node:6688) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Verify canary release
Provide environment information
Which example does this report relate to?
with-electron-typescript
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
run dev version, then
occurs.
in
package.json
,with-electron-typescript
useselectron
(^13)electron
(^13) bundlesnode
(v14.16)https://www.electronjs.org/docs/latest/tutorial/electron-timelines
but
WritableStream
innode:stream/web
https://github.com/vercel/next.js/blob/v13.4.1/packages/next/src/lib/download-wasm-swc.ts#L9
was added in
v16.5.0
https://nodejs.org/api/webstreams.html
version of
electron
is too old to use the latestnext
Expected Behavior
start dev version without error.
To Reproduce
start dev version
error occurs