npm test not working out of the box #1072

Closed
opened 2025-08-09 17:18:46 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @kkrueger on 1/30/2017

Version 0.8.0
npm version 4.0.5

yo aspnetcore-spa
Framework: Angular 2
Do you want to include unit tests? yes

Immediately thereafter:

C:\test>npm test

> Angular2Spa@0.0.0 test C:\test
> karma start ClientApp/test/karma.conf.js

30 01 2017 15:22:47.534:ERROR [config]: Error in config file!
 TypeError: require(...).filter is not a function
    at module.exports (C:\test\ClientApp\test\karma.conf.js:23:53)
    at Object.parseConfig (C:\test\node_modules\karma\lib\config.js:396:5)
    at new Server (C:\test\node_modules\karma\lib\server.js:56:20)
    at Object.exports.run (C:\test\node_modules\karma\lib\cli.js:280:7)
    at requireCliAndRun (C:\test\node_modules\karma-cli\bin\karma:44:16)
    at C:\test\node_modules\karma-cli\bin\karma:54:12
    at C:\test\node_modules\resolve\lib\async.js:45:21
    at ondir (C:\test\node_modules\resolve\lib\async.js:188:31)
    at C:\test\node_modules\resolve\lib\async.js:154:39
    at onex (C:\test\node_modules\resolve\lib\async.js:94:22)
    at C:\test\node_modules\resolve\lib\async.js:25:18
    at FSReqWrap.oncomplete (fs.js:112:15)
npm ERR! Test failed.  See above for more details.
*Originally created by @kkrueger on 1/30/2017* Version 0.8.0 npm version 4.0.5 ``` yo aspnetcore-spa Framework: Angular 2 Do you want to include unit tests? yes ``` Immediately thereafter: ``` C:\test>npm test > Angular2Spa@0.0.0 test C:\test > karma start ClientApp/test/karma.conf.js 30 01 2017 15:22:47.534:ERROR [config]: Error in config file! TypeError: require(...).filter is not a function at module.exports (C:\test\ClientApp\test\karma.conf.js:23:53) at Object.parseConfig (C:\test\node_modules\karma\lib\config.js:396:5) at new Server (C:\test\node_modules\karma\lib\server.js:56:20) at Object.exports.run (C:\test\node_modules\karma\lib\cli.js:280:7) at requireCliAndRun (C:\test\node_modules\karma-cli\bin\karma:44:16) at C:\test\node_modules\karma-cli\bin\karma:54:12 at C:\test\node_modules\resolve\lib\async.js:45:21 at ondir (C:\test\node_modules\resolve\lib\async.js:188:31) at C:\test\node_modules\resolve\lib\async.js:154:39 at onex (C:\test\node_modules\resolve\lib\async.js:94:22) at C:\test\node_modules\resolve\lib\async.js:25:18 at FSReqWrap.oncomplete (fs.js:112:15) npm ERR! Test failed. See above for more details. ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1072
No description provided.