Skip to content

problem with "ng test" and "ng e2e" - not working! Why?  #4860

Closed

Description

@j-Cis

OS:

Windows x64 10 Pro Insider build 15031.rs2

Versions:

@angular/cli: 1.0.0-beta.32.3
node: 7.5.0
os: win32 x64
@angular/common: 4.0.0-beta.8
@angular/compiler: 4.0.0-beta.8
@angular/core: 4.0.0-beta.8
@angular/forms: 4.0.0-beta.8
@angular/http: 4.0.0-beta.8
@angular/material: 2.0.0-beta.2
@angular/platform-browser: 4.0.0-beta.8
@angular/platform-browser-dynamic: 4.0.0-beta.8
@angular/platform-server: 4.0.0-beta.8
@angular/platform-webworker: 4.0.0-beta.8
@angular/platform-webworker-dynamic: 4.0.0-beta.8
@angular/router: 4.0.0-beta.8
@angular/cli: 1.0.0-beta.32.3
@angular/compiler-cli: 4.0.0-beta.8

Repro steps.

I created next published and this working but, wanted to do the test but the test does not work, why? code is available here https://github.com/Cisowscy/DNA4 and here https://travis-ci.org/Cisowscy/DNA4 result is here https://cisowscy.github.io/DNA4/

The log given by the failure. ng test

ng test
21 02 2017 08:41:54.749:ERROR [config]: Invalid config file!
D:\Users\CisSasGot\Desktop\dna\DNA4\karma.conf.js:45
customLaunchers: {
^^^^^^^^^^^^^^^
SyntaxError: Unexpected identifier
at Object.exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:543:28)
at Object.Module._extensions..js (module.js:580:10)
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 Object.parseConfig (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\karma\lib\config.js:349:22)
at new Server (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\karma\lib\server.js:56:20)
at Promise (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules@angular\cli\tasks\test.js:33:33)
at Class.run (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules@angular\cli\tasks\test.js:15:16)
at Class.run (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules@angular\cli\commands\test.js:38:25)
at Class. (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules@angular\cli\ember-cli\lib\models\command.js:134:17)
at process._tickCallback (internal/process/next_tick.js:103:7)

The log given by the failure. ng e2e

λ ng e2e

** NG Live Development Server is running on http://localhost:4200. **
(node:12048) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
Hash: 67a5878af158cc5c3ba0
Time: 36419ms
chunk {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 230 kB {4} [initial] [rendered]
chunk {1} main.bundle.js, main.bundle.js.map (main) 17.1 kB {3} [initial] [rendered]
chunk {2} styles.bundle.js, styles.bundle.js.map (styles) 37.9 kB {4} [initial] [rendered]
chunk {3} vendor.bundle.js, vendor.bundle.js.map (vendor) 4.43 MB [initial] [rendered]
chunk {4} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
webpack: Compiled successfully.
Cannot find module 'protractor/node_modules/webdriver-manager/built/lib/cmds/update' from 'D:\Users\CisSasGot\Desktop\dna\DNA4'
Error: Cannot find module 'protractor/node_modules/webdriver-manager/built/lib/cmds/update' from 'D:\Users\CisSasGot\Desktop\dna\DNA4'
at Function.module.exports [as sync] (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\resolve\lib\sync.js:36:11)
at Object.requireProjectModule (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules@angular\cli\utilities\require-project-module.js:5:28)
at D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules@angular\cli\tasks\e2e.js:34:66
at Class.run (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules@angular\cli\tasks\e2e.js:15:16)
at Compiler.rebuildCb (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules@angular\cli\commands\e2e.js:50:48)
at Compiler.applyPlugins (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\tapable\lib\Tapable.js:61:14)
at Watching._done (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\webpack\lib\Compiler.js:91:17)
at D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\webpack\lib\Compiler.js:74:18
at Compiler.emitRecords (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\webpack\lib\Compiler.js:351:37)
at D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\webpack\lib\Compiler.js:57:19
at D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\webpack\lib\Compiler.js:344:11
at next (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\tapable\lib\Tapable.js:154:11)
at Compiler.compiler.plugin (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\webpack\lib\performance\SizeLimitsPlugin.js:99:4)
at next (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\tapable\lib\Tapable.js:156:14)
at Compiler.compiler.plugin (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules@ngtools\webpack\src\plugin.js:222:13)
at Compiler.applyPluginsAsyncSeries1 (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\tapable\lib\Tapable.js:158:13)
at Compiler.afterEmit (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\webpack\lib\Compiler.js:341:8)
at Compiler. (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\webpack\lib\Compiler.js:336:14)
at D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\async\dist\async.js:359:16
at iteratorCallback (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\async\dist\async.js:935:13)
at D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\async\dist\async.js:843:16
at MemoryFileSystem.writeFile (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\memory-fs\lib\MemoryFileSystem.js:328:9)
at Compiler.writeOut (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\webpack\lib\Compiler.js:330:27)
at Immediate. (D:\Users\CisSasGot\Desktop\dna\DNA4\node_modules\memory-fs\lib\MemoryFileSystem.js:288:4)
at runCallback (timers.js:651:20)
at tryOnImmediate (timers.js:624:5)
at processImmediate [as _immediateCallback] (timers.js:596:5)

Sincerely John, @CisSasGot @Cisowscy :)

Thanks! We'll be in touch soon.

Activity

  1. Meligy commented on Feb 26, 2017

    @Meligy
    Contributor

    If you are using Yarn, then this is probably a duplicate of #4968.

    In that case, removing node_modules, and running npm install should work as a temporary workaround. It's still broken in rc0 as I can see.

  2. Meligy commented on Feb 26, 2017

    @Meligy
    Contributor

    Another workaround (if this is about Yarn as I suspect): #4597 (comment).

  3. filipesilva commented on Mar 13, 2017

    @filipesilva
    Contributor

    Closing as answered

    The ng e2e bit was answered by @Meligy.

    Your problem with ng test is what it says on the error you pasted here. Your config is invalid.

    ng test
    21 02 2017 08:41:54.749:ERROR [config]: Invalid config file!
    D:\Users\CisSasGot\Desktop\dna\DNA4\karma.conf.js:45
    customLaunchers: {
    ^^^^^^^^^^^^^^^
    SyntaxError: Unexpected identifier
    
  4. angular-automatic-lock-bot commented on Sep 6, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  5. locked and limited conversation to collaborators on Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions