grunt“错误:无法找到模块'../time/convert'(仅限在Windows上)

时间:2013-11-10 03:38:37

标签: windows node.js npm gruntjs

在linux下设置一个新的角度项目。致力于git并将其克隆到windows。使用bower和npm,我设法加载所有东西,除了,我有一个错误(仅在Windows上)

项目中../time/convert的递归grep显示:

./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

但是ls -l显示:

$ 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

其中说convert.js实际上就在那里。对于咕噜咕噜和棱角分明的新手,我很困惑这可能来自哪里以及如何解决它。

在此之后,我最终被困在这里:

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.

想知道在Windows上是否无法使用grunt进行角度工作....

1 个答案:

答案 0 :(得分:-1)

我的解决方案是退出使用Windows。将开发工作转移到linux,没有像这样的疯狂问题。哦,我的机器现在似乎也更快了。