gpt4 book ai didi

windows - grunt "Error: Cannot find module ' ../time/convert'(仅在 Windows 上)

转载 作者:可可西里 更新时间:2023-11-01 10:52:01 24 4
gpt4 key购买 nike

在linux下建立一个新的angular项目。将其提交到 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 实际上就在那里。作为 grunt 和 angular 的新手,我很困惑这可能来自哪里以及如何解决它。

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

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 进行角度工作....

最佳答案

我的解决方案是停止使用 Windows。将开发工作转移到 linux,不再有像这样的疯狂问题。哦,我的机器现在似乎也快了很多。

关于windows - grunt "Error: Cannot find module ' ../time/convert'(仅在 Windows 上),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19886013/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com