Skip to content Skip to sidebar Skip to footer

Karma Webpack - Error: Cannot Find Module "./test/utilities.js"

I'm using Karma Webpack for the unit tests of a project. When I run karma start, I have this error: Error: Cannot find module './test/utilities.js' at /myproject/test/campaign.te

Solution 1:

Dependencies paths are relative to current script. So just rewrite your require statement:

var utilities = require('./utilities.js');

Post a Comment for "Karma Webpack - Error: Cannot Find Module "./test/utilities.js""