2

Setup a new angular project under linux. Committed it to git and cloned it to windows. Using bower and npm, I managed to get everything loaded, except, I have this one error (only on windows)

A recursive grep for ../time/convert in the project shows me:

./node_modules/grunt-contrib-imagemin/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/diff.js:var convert = require('../time/convert');
./node_modules/grunt-contrib-imagemin/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js:define(['./totalDaysInMonth', './totalDaysInYear', '../time/convert'], function(totalDaysInMonth, totalDaysInYear, convert){
./node_modules/grunt-contrib-imagemin/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/diff.js:var convert = require('../time/convert');
./node_modules/grunt-contrib-imagemin/node_modules/pngquant-bin/node_modules/bin-wrapper/node_modules/mout/date/diff.js:var convert = require('../time/convert');
./node_modules/grunt-contrib-imagemin/node_modules/pngquant-bin/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js:define(['./totalDaysInMonth', './totalDaysInYear', '../time/conve

but ls -l shows:

$ ls ./node_modules/grunt-contrib-imagemin/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time
convert.js  now.js  parseMs.js  toTimeString.js

Which says that convert.js is actually there. Being new to grunt and angular, I'm puzzled where this could be coming from and how to troubleshoot it.

After this I end up getting stuck here:

Running "karma:unit" (karma) task
INFO [karma]: Karma v0.10.4 server started at http://localhost:8080/
INFO [launcher]: Starting browser Chrome
WARN [watcher]: Pattern ".../test/mock/**/*.js" does not match any file
WARN [launcher]: Chrome have not captured in 60000 ms, killing.
INFO [launcher]: Trying to start Chrome again.
WARN [launcher]: Chrome have not captured in 60000 ms, killing.
INFO [launcher]: Trying to start Chrome again.

Wondering if angular work using grunt is just not possible on Windows....

boatcoder
  • 17,525
  • 18
  • 114
  • 178
  • my guess, the mout library is assuming *nix paths. you could try editing those lines to use [path.normalize](http://nodejs.org/api/path.html#path_path_normalize_p) e.g. `var path = require('path'); var convert = require(path.normalize('../time/convert'));` I haven't actually used this so I can't promise it would work but it's the first thing I'd try – Plato Nov 10 '13 at 07:26
  • looks like I might be mistaken and that's unnecessary, http://stackoverflow.com/questions/9756567/do-you-need-to-use-path-join-in-node-js – Plato Nov 10 '13 at 07:46
  • in my case, the same error is when trying to install bower; however, there *is no time/ folder* at the place it should be. There's only a ``time.js`` file containing ``//automatically generated, do not edit! run `node build` instead`` and require calls to ``./time/etcpp``. But still: there is no such folder, only in a ``src`` directory... any ideas? – Adrian Föder May 12 '14 at 15:44
  • meh... a ``bower update mout`` fixed the problem. – Adrian Föder May 12 '14 at 15:53

1 Answers1

-1

My solution was to quit using windows. Moved dev work to linux, and no more crazy problems like this. Oh, and my machine now seems a good deal faster too.

boatcoder
  • 17,525
  • 18
  • 114
  • 178