Module not found: Error: Cannot resolve 'file' or 'directory' -- only on Travis

216 Views Asked by At

I am trying to run tests with Travis CI, but I am getting:

Module not found: Error: Cannot resolve 'file' or 'directory' ../api/Seminar in ...

I do not see this error on my local machine (Mac).

The Node version of Travis and my Mac are identical:

node v7.1.0
npm  v3.10.9

Here is a larger dump of the error:

ERROR in ./~/isparta-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/UpcomingSeminars.vue
Module not found: Error: Cannot resolve 'file' or 'directory' ../api/Seminar in /home/travis/build/tam5/my-app/src/components
 @ ./~/isparta-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/UpcomingSeminars.vue 9:786-813
14 11 2016 19:50:54.546:INFO [karma]: Karma v1.3.0 server started at http://localhost:9876/
14 11 2016 19:50:54.548:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency
14 11 2016 19:50:54.554:INFO [launcher]: Starting browser PhantomJS
14 11 2016 19:50:54.922:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket /#IMyChahiZWxdaUeTAAAA with id 80626811
PhantomJS 2.1.1 (Linux 0.0.0) ERROR
  Error: Cannot find module "../api/Seminar"
  at webpack:///src/components/UpcomingSeminars.vue?4396:9:0 <- index.js:26609

Here is my entire .travis.yml:

language: node_js

node_js:
  - "7"
  - "6"

How can I fix this to run on Travis as well?

0

There are 0 best solutions below