Skip to content

Running ng e2e throws cannot find definition files (rc0) #5082

Closed
@adrianchia

Description

@adrianchia

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Windows 10

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:
@angular/cli: 1.0.0-rc.0
node: 7.6.0
os: win32 x64
@angular/common: 4.0.0-rc.1
@angular/compiler: 4.0.0-rc.1
@angular/core: 4.0.0-rc.1
@angular/forms: 4.0.0-rc.1
@angular/http: 4.0.0-rc.1
@angular/material: 2.0.0-beta.2
@angular/platform-browser: 4.0.0-rc.1
@angular/platform-browser-dynamic: 4.0.0-rc.1
@angular/router: 4.0.0-rc.1
@angular/cli: 1.0.0-rc.0
@angular/compiler-cli: 4.0.0-rc.1

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
The project was created via ng new -ng4 --routing --styles=scss hello

The log given by the failure.

Normally this include a stack trace and some more information.
webpack: Compiled successfully.
[16:06:50] I/update - chromedriver: file exists C:\Users\achia\workspace\hello\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.27.zip
[16:06:50] I/update - chromedriver: unzipping chromedriver_2.27.zip
[16:06:50] I/update - chromedriver: chromedriver_2.27.exe up to date
[16:06:50] I/launcher - Running 1 instances of WebDriver
[16:06:50] I/direct - Using ChromeDriver directly...
[16:06:53] E/launcher - Error: TSError: ⨯ Unable to compile TypeScript
Cannot find type definition file for 'jasmine'. (2688)
Cannot find type definition file for 'node'. (2688)
e2e\app.e2e-spec.ts (3,1): Cannot find name 'describe'. (2304)
e2e\app.e2e-spec.ts (6,3): Cannot find name 'beforeEach'. (2304)
e2e\app.e2e-spec.ts (10,3): Cannot find name 'it'. (2304)
e2e\app.e2e-spec.ts (12,5): Cannot find name 'expect'. (2304)
at getOutput (C:\Users\achia\workspace\hello\node_modules\ts-node\src\index.ts:312:17)
at C:\Users\achia\workspace\hello\node_modules\ts-node\src\index.ts:343:18
at Object.compile (C:\Users\achia\workspace\hello\node_modules\ts-node\src\index.ts:476:19)
at Module.m._compile (C:\Users\achia\workspace\hello\node_modules\ts-node\src\index.ts:406:44)
at Module._extensions..js (module.js:580:10)
at Object.require.extensions.(anonymous function) [as .ts] (C:\Users\achia\workspace\hello\node_modules\ts-node\src\index.ts:409:12)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at C:\Users\achia\workspace\hello\node_modules\jasmine\lib\jasmine.js:87:5
at Array.forEach (native)
at Jasmine.loadSpecs (C:\Users\achia\workspace\hello\node_modules\jasmine\lib\jasmine.js:86:18)
at Jasmine.execute (C:\Users\achia\workspace\hello\node_modules\jasmine\lib\jasmine.js:181:8)
at C:\Users\achia\workspace\hello\node_modules\protractor\built\frameworks\jasmine.js:132:15
at Function.promise (C:\Users\achia\workspace\hello\node_modules\q\q.js:682:9)
at C:\Users\achia\workspace\hello\node_modules\protractor\built\frameworks\jasmine.js:104:14
at _fulfilled (C:\Users\achia\workspace\hello\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Users\achia\workspace\hello\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Users\achia\workspace\hello\node_modules\q\q.js:796:13)
at C:\Users\achia\workspace\hello\node_modules\q\q.js:556:49
at runSingle (C:\Users\achia\workspace\hello\node_modules\q\q.js:137:13)
at flush (C:\Users\achia\workspace\hello\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
[16:06:53] E/launcher - Process exited with error code 100

Mention any other details that might be useful.

Setting types in e2e/tsconfig.e2e.json to typeRoot pointing to ../node_modules/@types seems resolve the problem.


Thanks! We'll be in touch soon.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions