electron-userland / spectron

DEPRECATED: 🔎 Test Electron apps using ChromeDriver
http://electronjs.org/spectron
MIT License
1.68k stars 229 forks source link

export interface SpectronClient extends WebdriverIO.BrowserObject #1036

Closed marabesi closed 2 years ago

marabesi commented 2 years ago

Hello there, I am facing an issue related to the types the project offer, I am not sure if its something related to my own setup?

here goes the error:

> json-utility-tool@1.0.0 build /home/marabesi/Documents/json-utility-tool
> rimraf ./dist && tsc && cp -R package.json src/view ./dist 

node_modules/spectron/lib/spectron.d.ts:66:55 - error TS2694: Namespace '"/home/marabesi/Documents/json-utility-tool/node_modules/webdriverio/build/index"' has no exported member 'BrowserObject'.

66   export interface SpectronClient extends WebdriverIO.BrowserObject {
                                                         ~~~~~~~~~~~~~

Found 1 error.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! json-utility-tool@1.0.0 build: `rimraf ./dist && tsc && cp -R package.json src/view ./dist `
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the json-utility-tool@1.0.0 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!     /home/marabesi/.npm/_logs/2021-09-25T11_34_50_685Z-debug.log

It happens if I run tsc to transpile the source code, here is my tsconfig:

{
  "compilerOptions": {
    "lib": ["es5", "es2015.promise", "dom", "es2015"],
    "esModuleInterop": true,
    "module": "commonjs",
    "noImplicitAny": true,
    "sourceMap": true,
    "outDir": "dist",
    "baseUrl": ".",
    "paths": {
      "*": ["node_modules/*"]
    },
    "types": [
      "node",
      "jest",
      "webdriver",
      "webdriverio/async",
    ]
  },
  "include": [
    "src/**/*"
  ],
}

Repo with the error: https://github.com/marabesi/json-utility-tool

marabesi commented 2 years ago

Not sure what happened, switched my own made tsconfig by reactjs create react app and now it works