Feb 14 2018 04:12 AM
Background Info
I'm having trouble testing my solution once I've included a custom npm package (through VSTS). I've setup my tests by following Elio Struyf's demo and created a npm package following another demo I found on the subject. I then followed VSTS guide for setting up the package for distribution and seemingly everything works.
Trouble
Once I added the package and ran gulp test I got the following error from karma/PhantomJS:
14 02 2018 11:55:19.868:DEBUG [phantomjs.launcher]: Error: Cannot find module "oz-date-utils" 14 02 2018 11:55:19.868:DEBUG [phantomjs.launcher]: http://localhost:9876/base/temp/tests.js?d8f3aa9c7d469d8d14c04541e9480ad6098bbb15:43884 in webpackMissingModule http://localhost:9876/base/temp/tests.js?d8f3aa9c7d469d8d14c04541e9480ad6098bbb15:43884 http://localhost:9876/base/temp/tests.js?d8f3aa9c7d469d8d14c04541e9480ad6098bbb15:20 in __webpack_require__ http://localhost:9876/base/temp/tests.js?d8f3aa9c7d469d8d14c04541e9480ad6098bbb15:43819 http://localhost:9876/base/temp/tests.js?d8f3aa9c7d469d8d14c04541e9480ad6098bbb15:20 in __webpack_require__ http://localhost:9876/base/temp/tests.js?d8f3aa9c7d469d8d14c04541e9480ad6098bbb15:19121 in webpackContext :0 in forEach http://localhost:9876/base/temp/tests.js?d8f3aa9c7d469d8d14c04541e9480ad6098bbb15:19109 http://localhost:9876/base/temp/tests.js?d8f3aa9c7d469d8d14c04541e9480ad6098bbb15:20 in __webpack_require__ http://localhost:9876/base/temp/tests.js?d8f3aa9c7d469d8d14c04541e9480ad6098bbb15:63 PhantomJS 2.1.1 (Windows 8.0.0) ERROR Error: Cannot find module "oz-date-utils" at C:/Users/ketill/Vinna/frameWORK/ozGanttChartResourceManagement/temp/tests.js:43884 PhantomJS 2.1.1 (Windows 8.0.0) ERROR Error: Cannot find module "oz-date-utils" at C:/Users/ketill/Vinna/frameWORK/ozGanttChartResourceManagement/temp/tests.js:43884
Frankly I don't even know where to begin as I've never used Karma or Phantom before. I've tried going through the npm demo again and comparing my package to others and noticed no apparent discrepancy.
All help greatly appreciated, I'll gladly provide sources for anything that might help but I decided not to overcrowd this original post :)
Feb 14 2018 11:49 AM