spaceagetv / electron-playwright-example

Example of multi-window Playwright testing with Electron
MIT License
79 stars 8 forks source link

unable to run e2e test due to packaging error inside Forge #9

Closed freetomik closed 1 year ago

freetomik commented 1 year ago

I am unable to run e2e test under Windows. I don't have much experience with Electron, Forge and Playwright yet. Any help appreciated.

OS: Windows 10 Pro, 22H2 Console: PowerShell 7.3.0

npm run e2e

> electron-playwright-example@1.0.0 pree2e
> npm run package

> electron-playwright-example@1.0.0 package
> electron-forge package

✔ Checking your system
✖ Preparing to package application
  › Expected plugin to either be a plugin instance or a { name, config } object but found @electron-forge/plugin-webpack,[object Object]
◼ Running packaging hooks
◼ Packaging application
◼ Running postPackage hook

An unhandled rejection has occurred inside Forge:
Error: Expected plugin to either be a plugin instance or a { name, config } object but found @electron-forge/plugin-webpack,[object Object]

Electron Forge was terminated. Location:
at C:\Users\hudziect\zdrojový kód\electron-playwright-example\node_modules\@electron-forge\core\dist\util\plugin-interface.js:39:19
    at Array.map (<anonymous>)
    at new PluginInterface (C:\Users\hudziect\zdrojový kód\electron-playwright-example\node_modules\@electron-forge\core\dist\util\plugin-interface.js:21:44)
    at Object._default [as default] (C:\Users\hudziect\zdrojový kód\electron-playwright-example\node_modules\@electron-forge\core\dist\util\forge-config.js:157:43)
    at async Task.task (C:\Users\hudziect\zdrojový kód\electron-playwright-example\node_modules\@electron-forge\core\dist\api\package.js:82:35)
    at async Task.run (C:\Users\hudziect\zdrojový kód\electron-playwright-example\node_modules\listr2\dist\index.cjs:978:11)
    at async C:\Users\hudziect\zdrojový kód\electron-playwright-example\node_modules\p-map\index.js:57:22
node --version
v18.12.1
npm --version
9.1.2
freetomik commented 1 year ago
npm list
electron-playwright-example@1.0.0 C:\Users\path\electron-playwright-example
+-- @electron-forge/cli@6.0.3
+-- @electron-forge/maker-deb@6.0.3
+-- @electron-forge/maker-rpm@6.0.3
+-- @electron-forge/maker-squirrel@6.0.3
+-- @electron-forge/maker-zip@6.0.3
+-- @electron-forge/plugin-webpack@6.0.0-beta.64
+-- @playwright/test@1.28.1
+-- @types/fs-extra@9.0.13 extraneous
+-- @typescript-eslint/eslint-plugin@5.45.0
+-- @typescript-eslint/parser@5.45.0
+-- @vercel/webpack-asset-relocator-loader@1.7.2
+-- asar@3.2.0
+-- css-loader@6.7.2
+-- electron-installer-common@0.10.3 extraneous
+-- electron-playwright-helpers@1.2.0
+-- electron-squirrel-startup@1.0.0
+-- electron@19.1.8
+-- eslint-plugin-import@2.26.0
+-- eslint@8.28.0
+-- fork-ts-checker-webpack-plugin@7.2.13
+-- jimp@0.16.2
+-- node-loader@2.0.0
+-- playwright-core@1.28.1
+-- playwright@1.28.1
+-- style-loader@3.3.1
+-- tmp-promise@3.0.3 extraneous
+-- tmp@0.2.1 extraneous
+-- ts-loader@9.4.1
`-- typescript@4.9.3
jjeff commented 1 year ago

This should have been fixed by https://github.com/spaceagetv/electron-playwright-example/pull/8. If not, please reopen this issue.

freetomik commented 1 year ago

It is fixed, thank you!