Protractor: No Inputs were found in config file Error

Created on 10 Oct 2018  路  27Comments  路  Source: angular/protractor

Hi there!

The VS Code 1.28.0 on Mac shows the following error innode_modules/protractor/tsconfig.json:

No inputs were found in config file
 '~/projects/myproject/node_modules/protractor/tsconfig.json'. 

Specified 'include' paths were '["**/*"]' and 'exclude' paths were
'["built","node_modules","testapp","website","scripts","exampleTypescript","spec/**/*"]'.

Very annoying and makes the proble window show up all the time. Is it something that can be fixed?

  • Node Version: 10.11
  • Protractor Version: 5.4.1
  • Angular Version: 6
  • Browser(s): Chrome
  • Operating System and Version: Mac High Sierra

Most helpful comment

Restarting VSCode fixed this error like a magic in my case.

All 27 comments

Hi, @demisx ! Could you please share your config file and spec example?

@IgorSasovets Please see attached below. Let me know if you need anything else. What's strange. sometimes this error goes away and then comes back. Running tsc -p e2e; tsc -p . in CLI is always clean.

// In ./tsconfig.json
{
  "compileOnSave": false,
  "compilerOptions": {
    "strict": true,
    "outDir": "./dist/out-tsc",
    "baseUrl": "src",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "skipLibCheck": true,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2016",
      "dom"
    ]
  }
}

```ts
// In ./e2e/tsconfig.e2e.json
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es5",
"types": ["jasmine", "jasminewd2", "node"],
"strict": true
}
}

```ts
// In ./e2e/protractor.conf.js
...
exports.config = {
  allScriptsTimeout: 45000,
  specs: ['./**/*.e2e-spec.ts'],
  capabilities: {
    browserName: 'chrome',
      chromeOptions: {
        args: ["--headless", "--disable-gpu", "--window-size=1024,600"]
      }
  },
  SELENIUM_PROMISE_MANAGER: false,
  directConnect: true,
  baseUrl: 'http://localhost:4202/',
  framework: 'jasmine',
  noGlobals: true,
  random: true,
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 100000,
  },

  onPrepare: () => {
    process.env.NODE_ENV = 'e2e'
    process.setMaxListeners(20)
    require('ts-node').register({
      project: 'e2e/tsconfig.e2e.json',
    })
    jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }))
  },
}
// In ./e2e/browse-ads.e2e-spec.ts
describe('As a user, I can browse published ads', () => {
  afterEach(async () => {
    await browser.restart()
  })

  it('in virtual community classified section', async () => {
    const listAdsState = new ListAdsVirtualSectionInitState()
    await listAdsState.get()
    await listAdsState.selfCheck()
  })
  ...
})

Hi, @demisx ! Sorry for the late response. Could you please take a look at this example project. There are some basic e2e tests. Try to run it and notify me about the results.

They are almost the same, but take a look at specs definition in provided example. Maybe you need to change regex to

specs: [
    './src/**/*.e2e-spec.ts'
 ]

Thank you. I've cloned your example project and didn't see this error showing up there yet. I've tried to update the specs array in my project to something more restrictive specs: ['./*.e2e-spec.ts'],, but it didn't make any difference. The "No inputs were found..." error still shows up after a few minutes following opening of the project in VS Code. Pretty puzzled at this point.

screen shot 2018-10-16 at 8 09 23 am

maybe you could try just pass ../test/**/*.js. I mean the real way from your specific outdir path?

@CrispusDH I am sorry, but I am not following. My e2e specs are ./e2e folder, so is protractor.config.js. The specs are in TypeScript and compiled on the fly by ts-node. This is why it's set to specs: ['./*.e2e-spec.ts']. If I change it to ../test/**/*.js nothing is going to match.

And do you think the problem is somewhere in my code and not in protractor and/or maybe a bug in VS Code? After all, it complains about node_modules/protractor/tsconfig.json file, outside of my project folders.

I suggest that it could be an issue with on fly by ts-node. Could you try without it :)

Disabling ts-node makes no difference.

My second suggestion that it is a mess in path. Could you try to do the same as in @IgorSasovets example:

  • baseUrl in tsconfig.json
  • specs in protractor.conf.js
  • project path in protractor.conf.js

@demisx , could you share your test project (you can modify it and delete essential data)? I'd run it on my local machine and notify you about the results.

I am currently under a couple of deadlines, so preparing this project will be difficult. I'll see if I can come up with anything if that error still stays on. Currently, it's gone again.

@IgorSasovets Is there any way I could give you a temporary access to the project repo, so you can clone and see the error yourself?

@demisx , yes, just mail me.

Upon further testing, this error appears to be VS Code related and very intermittent. Even @IgorSasovets could not replicate it. Closing it hoping 馃 that one of the future IDE releases will fix it.

Hello,

I'm also using VS Code 1.20.1, but on windows, and I started receiving the same message @demisx reported.
I noticed that it started after I imported EventEmitter from Protractor by mistake (I needed to import it form angular core). It doesn't disturb me tho.
It could be a starting point...

i got this as well, restarting vs code fixed the issues for me. just in case, someone stumped on this in future and this may help!

@raheel0452 See if this error is back after restart. It disappeared for me initially, but then, some time later, the old good friend was knocking back at the front door.

I started to get this issue today after updating macOS to 10.14.4

VSCode did not update (or at least, did not show usual 'welcome' screen it usually shows after update), and is currently version 1.32.3

Not only is it giving me this warning in tsconfig, it is also showing red underlines for all of my imports that start with @. I am working on a very large app, and in tsconfig and tsconfig.app.ts we have many common paths aliased using paths config. The app itself still works as it did before, but VSCode is underlining all of my aliases, and I am now unable to right-click on an import and peek/go to definition. Really frustrating.

Restarting VSCode fixed this error like a magic in my case.

For me, this error would disappear after restart, but then would be back later. I haven't figured out how to get rid of it, except exclude node_modules/ from the navigation tree which is not optimal, of course.

Restarting VSCode fixed this error like a magic in my case.

me too 馃槃

I'm still getting this issue on:

Version: 1.37.1
Commit: f06011ac164ae4dc8e753a3fe7f9549844d15e35
Date: 2019-08-15T16:16:34.800Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Darwin x64 18.7.0

tsconfig.json
{ "compilerOptions": { "module": "commonjs", "esModuleInterop": true, "target": "es6", "noImplicitAny": true, "moduleResolution": "node", "sourceMap": true, "outDir": "dist", "baseUrl": ".", "paths": { "*": [ "node_modules/*", "src/types/*" ] }, "lib": [ "es2015" ] }, "include": [ "src/**/*" ], "exclude": [""] }

Seeing this error again in the latest v1.39.2. 馃槥 Turns one of the top folders red.

No inputs were found in config file '/Users/dmoore/projects/bm/dl/dl-mono/web/node_modules/protractor/tsconfig.json'. Specified 'include' paths were '["**/*"]' and 'exclude' paths were '["built","node_modules","testapp","website","scripts","exampleTypescript","spec/**/*"]'.

Restarting VSCode fixed this error like a magic in my case.

did not fix my problem

i had the same problem, stopped seeing the error by changing my "include": [ "src//.ts" ], to "include": [ "/.ts" ]. hope this helps

Was this page helpful?
0 / 5 - 0 ratings