【问题标题】:Apache cordova visual studio 2015 app is not workingApache Cordova Visual Studio 2015 应用程序不工作
【发布时间】:2016-10-14 15:28:44
【问题描述】:

我正在使用 Visual Studio 2015,我的操作系统是 Windows 8。当我尝试在 Visual Studio 中运行我的第一个 Apache Cordova 应用程序时,我收到以下错误。我在选项中的 Cordova 工具中看到了一些解决方案并清理了 Cordova 缓存,但我努力工作显示相同的错误。所以我在下面显示相同请帮助我解决错误。 在此处输入代码 构建输出-

   1>------ Build started: Project: BlankCordovaApp1, Configuration: Debug Android ------
1>  ------ Ensuring correct global installation of package from source package directory: E:\VISUAL STUDIO SETUP\COMMON7\IDE\EXTENSIONS\APACHECORDOVATOOLS\packages\vs-tac
1>  ------ Name from source package.json: vs-tac
1>  ------ Version from source package.json: 1.0.42
1>  ------ Package not currently installed globally.
1>  ------ Installing globally from source package. This could take a few minutes...
1>  Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.
1>  npm ERR! Windows_NT 6.2.9200
1>  npm ERR! argv "C:\\Users\\gopus\\AppData\\Roaming\\Microsoft\\VisualStudio\\MDA\\vs-npm\\2.14.9\\\\node.exe" "C:\\Users\\gopus\\AppData\\Roaming\\Microsoft\\VisualStudio\\MDA\\vs-npm\\2.14.9\\node_modules\\npm\\bin\\npm-cli.js" "-g" "install" "E:\\VISUAL STUDIO SETUP\\COMMON7\\IDE\\EXTENSIONS\\APACHECORDOVATOOLS\\packages\\vs-tac" "--loglevel" "warn"
1>  npm ERR! node v0.12.9
1>  npm ERR! npm  v2.14.9
1>  npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
1>  npm ERR! self signed certificate in certificate chain
1>  npm ERR!
1>RUNMDAINSTALL : npm ERR! If you need help, you may report this error at:
1>  npm ERR!     <https://github.com/npm/npm/issues>
1>  npm ERR! Please include the following file with any support request:
1>  npm ERR!     C:\Users\gopus\AppData\Roaming\Microsoft\VisualStudio\MDA\vs-npm\2.14.9\npm-debug.log
1>  ------ npm install failed. Exit code: 1
1>  ------ Package installation failed. Retrying...
1>  npm WARN uninstall not installed in C:\Users\gopus\AppData\Roaming\npm\node_modules: "vs-tac"
1>  npm ERR! Windows_NT 6.2.9200
1>  npm ERR! argv "C:\\Users\\gopus\\AppData\\Roaming\\Microsoft\\VisualStudio\\MDA\\vs-npm\\2.14.9\\\\node.exe" "C:\\Users\\gopus\\AppData\\Roaming\\Microsoft\\VisualStudio\\MDA\\vs-npm\\2.14.9\\node_modules\\npm\\bin\\npm-cli.js" "-g" "install" "E:\\VISUAL STUDIO SETUP\\COMMON7\\IDE\\EXTENSIONS\\APACHECORDOVATOOLS\\packages\\vs-tac" "--loglevel" "warn"
1>  npm ERR! node v0.12.9
1>  npm ERR! npm  v2.14.9
1>  npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
1>  npm ERR! self signed certificate in certificate chain
1>  npm ERR!
1>RUNMDAINSTALL : npm ERR! If you need help, you may report this error at:
1>  npm ERR!     <https://github.com/npm/npm/issues>
1>  npm ERR! Please include the following file with any support request:
1>  npm ERR!     C:\Users\gopus\AppData\Roaming\Microsoft\VisualStudio\MDA\vs-npm\2.14.9\npm-debug.log
1>  ------ npm install failed. Exit code: 1
1>  ------ Package installation failed. Retrying...
1>  npm WARN uninstall not installed in C:\Users\gopus\AppData\Roaming\npm\node_modules: "vs-tac"
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(285,5): error : Error installing local npm package.
1>MSBUILD : cordova-build error : module.js:338
1>  module.js:338
1>MSBUILD : cordova-build error :  throw err;
1>      throw err;
1>MSBUILD : cordova-build error :  ^
1>            ^
1>MSBUILD : cordova-build error BLD401: Error : BLD00401 : Could not find module 'C:\Users\gopus\AppData\Roaming\npm\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>  Error Cannot find module 'C:\Users\gopus\AppData\Roaming\npm\node_modules\vs-tac\app.js'
1>MSBUILD : cordova-build error :  at Function.Module._resolveFilename (module.js:336:15)
1>      at Function.Module._resolveFilename (module.js:336:15)
1>MSBUILD : cordova-build error :  at Function.Module._load (module.js:278:25)
1>      at Function.Module._load (module.js:278:25)
1>MSBUILD : cordova-build error :  at Function.Module.runMain (module.js:501:10)
1>      at Function.Module.runMain (module.js:501:10)
1>MSBUILD : cordova-build error :  at startup (node.js:129:16)
1>      at startup (node.js:129:16)
1>MSBUILD : cordova-build error :  at node.js:814:3
1>      at node.js:814:3
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
[enter link description here][1]

https://github.com/npm/npm/issues/13475 这与我在 github 中解释的问题相同。我还附加了 2 个文件,您可以参考错误日志文件和错误。

【问题讨论】:

  • 请帮我解决问题
  • 从错误信息中,您使用的是系统代理,但 npm 没有使用此代理,因此无法下载包。尝试使用命令行工具重定向到文件夹C:\Users\gopus\AppData\Roaming\Microsoft\VisualStudio\MDA\vs-npm\2.14.9 并输入npm config set proxy http://&lt;your system proxy&gt;:&lt;port&gt;
  • C:\Users\gopus\AppData\Roaming\Microsoft\VisualStudio\MDA\vs-npm\2.14.9 npm config set proxy 127.0.0.1:8080 我在命令提示符下执行以下操作,然后运行我的项目在视觉工作室,但它显示相同的错误
  • 尝试勾选Tools->Options->Tools for Apache Cordova->Cordova Tools->Automatically detect proxy Configuration。
  • 是的,它已经在那里了。我在 c.itz 以外的某个地方安装了 vs 不工作

标签: node.js visual-studio-2015 npm apache-cordova


【解决方案1】:

我执行以下命令,它对我有用:

npm config set strict-ssl false
npm config set registry "http://registry.npmjs.org/"
npm --proxy http://user:password@proxy:8080 install

谢谢

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-10-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-04-13
    • 1970-01-01
    相关资源
    最近更新 更多