我在通过visual studio-2015执行Apache cordova构建时遇到了这个问题,我得到以下错误。
最后几行错误记录
> Prepared android project successfully
> No scripts found for hook "after_prepare".
> Checking config.xml for saved plugins that haven't been added to the project
> ------ Copied C:\Project\Mobile\bin\Android\Debug\VSBuildInfo.xml to platforms\android\assets\www\VSBuildInfo.xml
> ------ Building platform: android
> Debug
> ------ Build configuration options: --debug
> No scripts found for hook "before_compile".
> ANDROID_HOME=C:\Users\<username>\AppData\Local\Android\sdk
> JAVA_HOME=C:\Program Files\Java\jdk1.8.0_144
> Reading build config file: C:\Project\Mobile\build.json
> MSBUILD : cordova-build error : TypeError: undefined is not a function
> TypeError undefined is not a function
感谢任何帮助。
答案 0 :(得分:0)
我认为是与节点版本相关的问题。
尝试使用 VS Cordova工具和 Cordova 的最新版本进行构建后,我已经在最新节点版本上加入了一些问题。
尝试将节点降级为节点4.8.7 LTS