我试图在Windows中运行应用程序,此应用程序有一些摩卡测试。我需要制造。我读这如何在windows node.js上运行Mocha测试(错误:无法找到模块'C: cygdrive c Users)
Mocha requires make. Can't find a make.exe that works on Windows
这
Node.js cannot find module - interfering with cygwin on Windows
我在Github上目录中的应用(外cygwin目录结构)和i节点安装的Windows版本。
我尝试使用PowerShell和设置别名的建议,但我总是得到
> module.js:340 > throw err; > ^Error: Cannot find module 'C:\cygdrive\c\Users\Nicola\AppData\Roaming\npm\node_modules\mocha\bin\mocha' > at Function.Module._resolveFilename (module.js:338:15) > at Function.Module._load (module.js:280:25) > at Module.runMain (module.js:487:10) > at process.startup.processNextTick.process._tickCallback (node.js:244:9) Makefile:5: recipe for target `test' failed make: *** > [test] Error 1
和我已经安装在该目录摩卡(顺便说一句他为什么不去找在node_modules子目录摩卡?)。问题似乎是C:\cygdrive\c\Users
部分我该如何解决这个问题?
我也试过在Cygwin的文件复制到我家/目录,但我得到了
./node_modules/.bin/mocha: line 1: ../mocha/bin/mocha: No such file or directory
Makefile:5: recipe for target `test' failed
make: *** [test] Error 127
我应该怎么办?
我会接受你的答案,最后它是如此麻烦,我只是搬到了Ubuntu的 – 2012-07-24 22:34:15
我经历了和你一样的挫折感,最终做了同样的事情 - 它只是比方式更好在Windows上开发:) – 2012-07-25 01:52:51