capacitor-community / capacitor-community/electron

shell.openExternal() raising errors

Open
#163 12 comments 0 reactions 0 assignees View on GitHub
external cause needs reply
Dominant language
TypeScript
Stars
398
Forks
63
PR merge metrics
No merged PRs in 30d

Description

Hello,
I once asked a question on how to open a url with my ionic desktop app using @capacitor-community/electron, which i got an answer to use:
import { shell } from '@capacitor-community/electron';
shell.openExternal(url);
which i believe could would work, but it raising the following errors when i run npm run build

./electron/node_modules/fsevents/fsevents.node:1:0 - Error: Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

@capacitor-community/electron:1:1122-1135 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\node_modules\@capacitor-community\electron\dist\core'

@capacitor-community/electron:1:1168-1183 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\node_modules\@capacitor-community\electron\dist\core'

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 }

./electron/node_modules/builder-util-runtime/out/ProgressCallbackTransform.js:4:17-34 - Error: Module not found: Error: Can't resolve 'stream' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\builder-util-runtime\out'

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: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "stream": false }

./electron/node_modules/builder-util-runtime/out/httpExecutor.js:4:17-34 - Error: Module not found: Error: Can't resolve 'crypto' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\builder-util-runtime\out'

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 }

./electron/node_modules/builder-util-runtime/out/httpExecutor.js:6:13-26 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\builder-util-runtime\out'

./electron/node_modules/builder-util-runtime/out/httpExecutor.js:7:17-34 - Error: Module not found: Error: Can't resolve 'stream' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\builder-util-runtime\out'

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: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "stream": false }

./electron/node_modules/builder-util-runtime/out/uuid.js:4:17-34 - Error: mModule not found: Error: Can't resolve 'crypto' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\builder-util-runtime\out'

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 }

./electron/node_modules/chokidar/index.js:4:11-24 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\chokidar'

./electron/node_modules/chokidar/index.js:5:16-31 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\chokidar'

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 }

./electron/node_modules/chokidar/lib/constants.js:3:14-29 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\chokidar\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: { "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 }

./electron/node_modules/chokidar/lib/constants.js:5:11-24 - Error: Module not found: Error: Can't resolve 'os' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\chokidar\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: { "os": require.resolve("os-browserify/browser") }'
- install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "os": false }

./electron/node_modules/chokidar/lib/fsevents-handler.js:3:11-24 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\chokidar\lib'

./electron/node_modules/chokidar/lib/fsevents-handler.js:4:16-31 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\chokidar\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: { "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 }

./electron/node_modules/chokidar/lib/nodefs-handler.js:3:11-24 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\chokidar\lib'

./electron/node_modules/chokidar/lib/nodefs-handler.js:4:16-31 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\chokidar\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: { "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 }

./electron/node_modules/electron-serve/index.js:2:11-24 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-serve'

./electron/node_modules/electron-serve/index.js:3:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-serve'

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 }

./electron/node_modules/electron-updater/node_modules/fs-extra/lib/copy-sync/copy-sync.js:4:13-28[39m - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\node_modules\fs-extra\lib\copy-sync'

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 }

./electron/node_modules/electron-updater/node_modules/fs-extra/lib/copy/copy.js:4:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\node_modules\fs-extra\lib\copy'

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 }

./electron/node_modules/electron-updater/node_modules/fs-extra/lib/empty/index.js:5:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\node_modules\fs-extra\lib\empty'

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 }

./electron/node_modules/electron-updater/node_modules/fs-extra/lib/ensure/file.js:4:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\node_modules\fs-extra\lib\ensure'

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 }

./electron/node_modules/electron-updater/node_modules/fs-extra/lib/ensure/link.js:4:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\node_modules\fs-extra\lib\ensure'

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 }

./electron/node_modules/electron-updater/node_modules/fs-extra/lib/ensure/symlink-paths.js:3:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\node_modules\fs-extra\lib\ensure'

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 }

./electron/node_modules/electron-updater/node_modules/fs-extra/lib/ensure/symlink.js:4:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\node_modules\fs-extra\lib\ensure'

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 }

./electron/node_modules/electron-updater/node_modules/fs-extra/lib/mkdirs/utils.js:7:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\node_modules\fs-extra\lib\mkdirs'

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 }

./electron/node_modules/electron-updater/node_modules/fs-extra/lib/move-sync/move-sync.js:4:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\node_modules\fs-extra\lib\move-sync'

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 }

./electron/node_modules/electron-updater/node_modules/fs-extra/lib/move/move.js:4:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\node_modules\fs-extra\lib\move'

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 }

./electron/node_modules/electron-updater/node_modules/fs-extra/lib/output/index.js:5:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\node_modules\fs-extra\lib\output'

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 }

./electron/node_modules/electron-updater/node_modules/fs-extra/lib/remove/rimraf.js:4:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\node_modules\fs-extra\lib\remove'

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 }

./electron/node_modules/electron-updater/node_modules/fs-extra/lib/remove/rimraf.js:5:15-32 - Error: Module not found: Error: Can't resolve 'assert' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\node_modules\fs-extra\lib\remove'

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: { "assert": require.resolve("assert/") }'
- install 'assert'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "assert": false }

./electron/node_modules/electron-updater/node_modules/fs-extra/lib/util/stat.js:4:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\node_modules\fs-extra\lib\util'

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 }

./electron/node_modules/electron-updater/out/AppAdapter.js:4:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

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 }

./electron/node_modules/electron-updater/out/AppAdapter.js:5:13-26 - Error: Module not found: Error: Can't resolve 'os' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

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: { "os": require.resolve("os-browserify/browser") }'
- install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "os": false }

./electron/node_modules/electron-updater/out/AppImageUpdater.js:5:24-48 - Error: Module not found: Error: Can't resolve 'child_process' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

./electron/node_modules/electron-updater/out/AppImageUpdater.js:7:13-26 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

./electron/node_modules/electron-updater/out/AppImageUpdater.js:8:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

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 }

./electron/node_modules/electron-updater/out/AppUpdater.js:5:17-34 - Error: Module not found: Error: Can't resolve 'crypto' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

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 }

./electron/node_modules/electron-updater/out/AppUpdater.js:8:19-41 - Error: Module not found: Error: Can't resolve 'fs/promises' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

./electron/node_modules/electron-updater/out/AppUpdater.js:11:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

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 }

./electron/node_modules/electron-updater/out/DownloadedUpdateHelper.js:4:17-34 - Error: Module not found: Error: Can't resolve 'crypto' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

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 }

./electron/node_modules/electron-updater/out/DownloadedUpdateHelper.js:5:13-26 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

./electron/node_modules/electron-updater/out/DownloadedUpdateHelper.js:9:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

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 }

./electron/node_modules/electron-updater/out/ElectronAppAdapter.js:4:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

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 }

./electron/node_modules/electron-updater/out/MacUpdater.js:6:13-26 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

./electron/node_modules/electron-updater/out/MacUpdater.js:7:15-30 - Error: Module not found: Error: Can't resolve 'http' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

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 }

./electron/node_modules/electron-updater/out/MacUpdater.js:10:24-48 - Error: Module not found: Error: Can't resolve 'child_process' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

./electron/node_modules/electron-updater/out/NsisUpdater.js:5:24-48 - Error: Module not found: Error: Can't resolve 'child_process' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

./electron/node_modules/electron-updater/out/NsisUpdater.js:6:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

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 }

./electron/node_modules/electron-updater/out/NsisUpdater.js:16:15-30 - Error: Module not found: Error: Can't resolve 'zlib' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

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: { "zlib": require.resolve("browserify-zlib") }'
- install 'browserify-zlib'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "zlib": false }

./electron/node_modules/electron-updater/out/differentialDownloader/DataSplitter.js:5:13-26 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out\differentialDownloader'

./electron/node_modules/electron-updater/out/differentialDownloader/DataSplitter.js:6:17-34 - Error: Module not found: Error: Can't resolve 'stream' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out\differentialDownloader'

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: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "stream": false }

./electron/node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.js:6:13-26 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out\differentialDownloader'

./electron/node_modules/electron-updater/out/differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader.js:6:15-30 - Error: Module not found: Error: Can't resolve 'zlib' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out\differentialDownloader'

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: { "zlib": require.resolve("browserify-zlib") }'
- install 'browserify-zlib'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "zlib": false }

./electron/node_modules/electron-updater/out/differentialDownloader/ProgressDifferentialDownloadCallbackTransform.js:4:17-34 - Error: Module not found: Error: Can't resolve 'stream' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out\differentialDownloader'

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: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "stream": false }

./electron/node_modules/electron-updater/out/providers/PrivateGitHubProvider.js:6:13-28[0m - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out\providers'

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 }

./electron/node_modules/electron-updater/out/windowsExecutableCodeSignatureVerifier.js:5:24-48 - Error: Module not found: Error: Can't resolve 'child_process' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

./electron/node_modules/electron-updater/out/windowsExecutableCodeSignatureVerifier.js:6:11-24 - Error: Module not found: Error: Can't resolve 'os' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-updater\out'

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: { "os": require.resolve("os-browserify/browser") }'
- install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "os": false }

./electron/node_modules/electron-window-state/index.js:3:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-window-state'

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 }

./electron/node_modules/electron-window-state/node_modules/jsonfile/index.js:5:8-21 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-window-state\node_modules\jsonfile'

./electron/node_modules/electron-window-state/node_modules/mkdirp/index.js:1:11-26 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-window-state\node_modules\mkdirp'

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 }

./electron/node_modules/electron-window-state/node_modules/mkdirp/index.js:2:9-22 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\electron-window-state\node_modules\mkdirp'

./electron/node_modules/glob-parent/index.js:4:23-52 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\glob-parent'

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 }

./electron/node_modules/glob-parent/index.js:5:14-36 - Error: Module not found: Error: Can't resolve 'os' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\glob-parent'

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: { "os": require.resolve("os-browserify/browser") }'
- install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "os": false }

./electron/node_modules/graceful-fs/graceful-fs.js:1:9-22 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\graceful-fs'

./electron/node_modules/graceful-fs/graceful-fs.js:87:6-29 - Error: Module not found: Error: Can't resolve 'assert' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\graceful-fs'

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: { "assert": require.resolve("assert/") }'
- install 'assert'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "assert": false }

./electron/node_modules/graceful-fs/legacy-streams.js:1:13-37 - Error: Module not found: Error: Can't resolve 'stream' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\graceful-fs'

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: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "stream": false }

./electron/node_modules/graceful-fs/polyfills.js:1:16-36 - Error: Module not found: Error: Can't resolve 'constants' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\graceful-fs'

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: { "constants": require.resolve("constants-browserify") }'
- install 'constants-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "constants": false }

./electron/node_modules/is-binary-path/index.js:2:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\is-binary-path'

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 }

./electron/node_modules/jsonfile/index.js:5:8-21 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\jsonfile'

./electron/node_modules/picomatch/lib/constants.js:3:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\picomatch\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: { "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 }

./electron/node_modules/picomatch/lib/picomatch.js:3:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\picomatch\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: { "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 }

m./electron/node_modules/picomatch/lib/utils.js:3:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\picomatch\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: { "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 }

./electron/node_modules/readdirp/index.js:3:11-24 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\readdirp'

./electron/node_modules/readdirp/index.js:4:21-38 - Error: Module not found: Error: Can't resolve 'stream' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\readdirp'

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: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "stream": false }

./electron/node_modules/readdirp/index.js:5:16-31 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\node_modules\readdirp'

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 }

./node_modules/@capacitor-community/electron/dist/core/index.js:1:1122-1135 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\node_modules\@capacitor-community\electron\dist\core'

./node_modules/@capacitor-community/electron/dist/core/index.js:1:1168-1183 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\node_modules\@capacitor-community\electron\dist\core'

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 }

./node_modules/mime-types/index.js:16:14-37 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\node_modules\mime-types'

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 }

./electron/build/src/setup.js:11:15-30 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\ODUNAYO\Desktop\Flutter\newApp\electron\build\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: { "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 }

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! newApp@0.0.1 build: `ng build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the newApp@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ODUNAYO\AppData\Roaming\npm-cache\_logs\2022-01-11T09_47_38_459Z-debug.log

@IT-MikeS kindly help with this.

Thanks

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with npm run build and inspect how @capacitor-community/electron and the electron dependencies are bundled. Trace the reported fsevents.node and missing fs, path, stream, crypto, and os modules; done means the build completes and shell.openExternal(url) can be used without these errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, node.js, typescript, webpack
Domain
build-system, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.