Skip to content

Error in config file : Cannot find module 'angular-cli/plugins/karma' #2828

@jeremythille

Description

@jeremythille

Please provide us with the following information:

OS?

Windows 10 x64

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-beta.18
node: 6.4.0

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

Created the app usin the CLI (updated yesterday to the latest version). The app works and loads in Chrome. For now there's just an input field.
I created a service using "ng g myservice"
Then I wrote some tests in myservice.service.ts
I ran "ng test"

The log given by the failure.

Normally this include a stack trace and some more information.

$ ng test --watch=false
22 10 2016 11:05:54.156:ERROR [config]: Error in config file!
{ Error: Cannot find module 'angular-cli/plugins/karma'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at module.exports (D:\dev\wiki_a2\karma.conf.js:12:7)
at Object.parseConfig (D:\dev\wiki_a2\node_modules\karma\lib\config.js:377:5)
at new Server (D:\dev\wiki_a2\node_modules\karma\lib\server.js:56:20)
at C:\Users\Elg\AppData\Roaming\npm\node_modules\angular-cli\tasks\test.js:25:31
at Class.exports.default.Task.extend.run (C:\Users\Elg\AppData\Roaming\npm\node_modules\angular-cli\tasks\test.js:15:16)
at Class.TestCommand.extend.run (C:\Users\Elg\AppData\Roaming\npm\node_modules\angular-cli\commands\test.js:26:25)
at Class. (C:\Users\Elg\AppData\Roaming\npm\node_modules\angular-cli\node_modules\angular-cli\lib\models\command.js:152:17)
at tryCatch (C:\Users\Elg\AppData\Roaming\npm\node_modules\angular-cli\node_modules\rsvp\dist\lib\rsvp-internal.js:215:12)
at invokeCallback (C:\Users\Elg\AppData\Roaming\npm\node_modules\angular-cli\node_modules\rsvp\dist\lib\rsvp-internal.js:230:13)

at C:\Users\Elg\AppData\Roaming\npm\node_modules\angular-cli\node_modules\rsvp\dist\lib\rsvp\then.js:29:16
at flush (C:\Users\Elg\AppData\Roaming\npm\node_modules\angular-cli\node_modules\rsvp\dist\lib\rsvp\asap.js:85:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9) code: 'MODULE_NOT_FOUND' }

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions