2017-06-06 175 views
0

我有一些困難,試圖瞭解爲什麼Visual Studio中使用了不同版本的節點和NPM比安裝的是什麼...生成錯誤與科爾多瓦和Visual Studio 2015年社區

我的開發環境詳細介紹: -Windows 8.1 -Node版本:6.10.3(節點-v) -NPM版本:5.0.1(NPM -v)

當我打開了一個解決方案文件,我得到我的NPM輸出窗口下面的消息

PATH=.\node_modules\.bin;%VSINSTALLDIR%\Web\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin 
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\COMMUNITY\Web\External\npm.CMD" install 
npm ERR! Windows_NT 6.3.9600 
npm ERR! argv "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Web\\External\\Node.exe" "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Web\\External\\node_modules\\npm\\bin\\npm-cli.js" "install" 
npm ERR! node v5.4.1 
npm ERR! npm v3.3.4 
npm ERR! No compatible version found: [email protected] 
npm ERR! Valid install targets: 
npm ERR! ["2.9.0","2.8.1","2.8.0","2.7.0","2.6.0","2.5.1","2.5.0","2.4.1","2.4.0","2.3.2","2.3.1","2.3.0","2.2.17","2.2.16","2.2.15","2.2.14","2.2.13","2.2.12","2.2.11","2.2.10","2.2.9","2.2.8","2.2.7","2.2.6","2.2.5","2.2.4","2.2.3","2.2.2","2.2.1","2.2.0","2.1.9","2.1.8","2.1.7","2.1.6","2.1.5","2.1.4","2.1.3","2.1.2","2.0.3","2.0.2","2.0.1","2.0.0","1.3.27","1.3.26","1.3.25","1.3.24","1.3.23","1.3.22","1.3.21","1.3.20","1.3.19","1.3.18","1.3.17","1.3.16","1.3.15","1.3.14","1.3.13","1.3.12","1.3.11","1.3.10","1.3.9","1.3.8","1.3.7","1.3.6","1.3.5","1.3.4","1.3.3","1.3.2","1.3.1","1.3.0","1.2.4","1.2.3","1.2.2","1.2.1","1.2.0","1.1.1","1.1.0","1.0.12","1.0.11","1.0.10","1.0.9","1.0.8","1.0.7"] 
npm ERR! 

錯誤消息說Visual Studio正在嘗試使用節點v5.4.1和npm v3.3.4 ....這些版本在哪裏安裝?爲什麼它不使用Node 6.10.3和NPM 5.0.2?

任何幫助,這將是偉大的!

回答

0

看來您在應用程序中使用舊的ionic-native軟件包。你應該通過發出以下命令將其卸載,

npm uninstall --save ionic-native 

然後嘗試通過發出以下命令npm install安裝最新的一個,

npm install @ionic-native/core --save 

希望這有助於!

+0

感謝大衛......離子本地版本的問題歸結於項目中的一些奇怪的引用......這一切都開始於我從包中包含@ 3.5.0版本的另一個開發人員繼承項目.json文件...自從與開發人員交談後,他做了一個「恢復包」,他現在得到了和我一樣的錯誤信息,關於丟失的離子本機庫。 –

+0

他和我不知道如何解決方案最初得到了引用的@ 3.5.0版本,但我們已經按照您的建議去除了離子本機並用離子本機/內核替代。但是..我最初的問題是關於在構建窗口中列出的版本..在這種情況下。 'npm ERR!節點v5.4.1 npm ERR! npm v3.3.4',即使我已經安裝了Node 6.10.3和NPM 5.0.2 ...但這些版本正在顯示在輸出窗口中 –

相關問題