我有一个cordova项目。它运作得很好。但今天没有建设。
引发此错误。
1>MSBUILD : cordova-build error BLD401: Error : BLD00401 : Could not find module '{project-path}\node_modules\vs-tac\app.js'. Please Go to Tools --> Options --> Tools for Apache Cordova --> Cordova Tools --> Clear Cordova Cache and try building again.
1> at Function.Module._resolveFilename (module.js:336:15)
1> at Function.Module._load (module.js:278:25)
1> at Function.Module.runMain (module.js:501:10)
1> at startup (node.js:129:16)
1> at node.js:814:3
我搜索了这个,我找到了一些解决方案。
第一
在Cordova application build error
找到它执行第3步时出现以下错误
Error: The edge module has not been pre-compiled for node.js version v8.9.4. You
must build a custom version of edge.node. Please refer to https://github.com/tj
anczuk/edge for building instructions.
at determineVersion (C:\Users\mkumawat\AppData\Roaming\npm\node_modules\vs-t
ac\node_modules\edge\lib\edge.js:21:11)
at Object.<anonymous> (C:\Users\mkumawat\AppData\Roaming\npm\node_modules\vs
-tac\node_modules\edge\lib\edge.js:30:78)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Users\mkumawat\AppData\Roaming\npm\node_modules\vs
-tac\node_modules\edge\tools\checkplatform.js:2:2)
***************************************
Success: platform check for edge.js: node.js x64 v8.9.4
added 88 packages in 26.44s
最后转到另一个解决方案
第二
将此文件夹"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\packages\vs-tac"
复制到'C:\ Users [您的用户名] \ AppData \ Roaming \ npm \ node_modules'
和运行num install
命令。
运行命令时发现同样的错误Error: The edge module has not been pre-compiled for node.js version v8.9.4.................
我有
node v8.9.4
npm 5.6.0
任何人都知道这个错误。
任何帮助将不胜感激。