在我尝试修复this issue之后,这是一个跟进问题。
我现在有了Visual Studio 2015以及Apache Cordova的相关工具,但我仍然无法在ios模拟器中运行多设备混合应用程序。
我创建了一个新的空白Cordova项目,我可以在Ripple浏览器模拟器上运行它。但是,当我尝试在配置的Mac上运行应用程序以在ios上测试它时,我收到以下错误:
Done building 1630 : error CordovaModuleLoadError [ '4.3.0' ]
这是完整的终端输出:
IBRAHIM-ALHUSSAINs-Mac-mini:bin IBRAHIMALHUSSAIN$ vs-mda-remote --secure false
vs-mda-remote
Copyright (C) 2014 Microsoft Corporation. All rights reserved.
0.2.11
Loading resources for language en from /usr/local/lib/node_modules/vs-mda-remote/resources/en/resources.json
Build Retention initialized with baseBuildDir /Users/IBRAHIMALHUSSAIN/remote-builds/builds, maxBuildsToKeep 20
Initialized BuildManager with baseBuildDir /Users/IBRAHIMALHUSSAIN/remote-builds/builds; maxBuildsInQueue 10; deleteBuildsOnShutdown true; allowsEmulate true; nextBuildNumber 1629
Remote build server listening on [http] port 3000
ios-sim is installed on path at: /usr/local/lib/node_modules/vs-mda-remote/node_modules/ios-sim/build/release/ios-sim
New build request submitted:
/build/tasks?command=build&vcordova=4.3.0&cfg=debug
{ 'accept-language': 'en-US',
host: '192.168.1.11:3000',
connection: 'keep-alive',
'transfer-encoding': 'chunked' }
New build request submitted for cordovaVersion: 4.3.0; buildCommand: build; configuration: debug
Build will be executed under: /Users/IBRAHIMALHUSSAIN/remote-builds/builds/1630
Saving build request payload to : /Users/IBRAHIMALHUSSAIN/remote-builds/builds/1630
Saved upload to /Users/IBRAHIMALHUSSAIN/remote-builds/builds/1630/upload_1630.tgz
Extracting /Users/IBRAHIMALHUSSAIN/remote-builds/builds/1630/upload_1630.tgz to /Users/IBRAHIMALHUSSAIN/remote-builds/builds/1630/cordovaApp...
POST /build/tasks?command=build&vcordova=4.3.0&cfg=debug 202 427ms - 521b
GET /build/tasks/1630 200 4ms - 521b
Extracted app contents from uploaded build request to /Users/IBRAHIMALHUSSAIN/remote-builds/builds/1630/cordovaApp. Requesting build.
Taking 1630 as current build
Building cordova app BlankCordovaApp2015Test at appDir /Users/IBRAHIMALHUSSAIN/remote-builds/builds/1630/cordovaApp
Opened build log file /Users/IBRAHIMALHUSSAIN/remote-builds/builds/1630/build.log
GET /build/tasks/1630 200 22ms - 4.09kb
GET /build/tasks/1630 200 2ms - 4.09kb
GET /build/tasks/1630 200 2ms - 4.09kb
GET /build/tasks/1630 200 2ms - 4.09kb
GET /build/tasks/1630 200 2ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 0ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 9ms - 4.09kb
GET /build/tasks/1630 200 0ms - 4.09kb
GET /build/tasks/1630 200 2ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 2ms - 4.09kb
GET /build/tasks/1630 200 0ms - 4.09kb
GET /build/tasks/1630 200 2ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
GET /build/tasks/1630 200 1ms - 4.09kb
Done building 1630 : error CordovaModuleLoadError [ '4.3.0' ]
Done with currentBuild. Checking for next build in queue.
GET /build/tasks/1630 200 1ms - 4.12kb
GET /build/tasks/1630/log 200 3ms
我也尝试过更改npm目录found here的所有权的解决方案,这对我来说不起作用。当我尝试在上一个链接中的解决方案之后解决问题时,终端中的输出是:
IBRAHIM-ALHUSSAINs-Mac-mini:bin IBRAHIMALHUSSAIN$ ls
HideMeService idevicecrashreport ideviceinstaller iproxy
asn1Coding idevicedate idevicename node
asn1Decoding idevicedebug idevicenotificationproxy npm
asn1Parser idevicedebugserverproxy idevicepair plistutil
brew idevicediagnostics ideviceprovision vs-mda-remote
idevice_id ideviceenterrecovery idevicescreenshot zipcmp
idevicebackup ideviceimagemounter idevicesyslog zipmerge
idevicebackup2 ideviceinfo ios_webkit_debug_proxy ziptorrent
IBRAHIM-ALHUSSAINs-Mac-mini:bin IBRAHIMALHUSSAIN$ ls -l
total 70672
-rwxr-xr-x 1 root wheel 24308 Sep 1 2014 HideMeService
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 37 May 26 19:30 asn1Coding -> ../Cellar/libtasn1/4.5/bin/asn1Coding
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 39 May 26 19:30 asn1Decoding -> ../Cellar/libtasn1/4.5/bin/asn1Decoding
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 37 May 26 19:30 asn1Parser -> ../Cellar/libtasn1/4.5/bin/asn1Parser
-rwxr-xr-x 1 IBRAHIMALHUSSAIN admin 791 May 26 19:30 brew
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 47 May 26 19:30 idevice_id -> ../Cellar/libimobiledevice/1.2.0/bin/idevice_id
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 50 May 26 19:30 idevicebackup -> ../Cellar/libimobiledevice/1.2.0/bin/idevicebackup
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 51 May 26 19:30 idevicebackup2 -> ../Cellar/libimobiledevice/1.2.0/bin/idevicebackup2
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 55 May 26 19:30 idevicecrashreport -> ../Cellar/libimobiledevice/1.2.0/bin/idevicecrashreport
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 48 May 26 19:30 idevicedate -> ../Cellar/libimobiledevice/1.2.0/bin/idevicedate
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 49 May 26 19:30 idevicedebug -> ../Cellar/libimobiledevice/1.2.0/bin/idevicedebug
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 60 May 26 19:30 idevicedebugserverproxy -> ../Cellar/libimobiledevice/1.2.0/bin/idevicedebugserverproxy
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 55 May 26 19:30 idevicediagnostics -> ../Cellar/libimobiledevice/1.2.0/bin/idevicediagnostics
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 57 May 26 19:30 ideviceenterrecovery -> ../Cellar/libimobiledevice/1.2.0/bin/ideviceenterrecovery
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 56 May 26 19:30 ideviceimagemounter -> ../Cellar/libimobiledevice/1.2.0/bin/ideviceimagemounter
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 48 May 26 19:30 ideviceinfo -> ../Cellar/libimobiledevice/1.2.0/bin/ideviceinfo
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 55 May 26 19:30 ideviceinstaller -> ../Cellar/ideviceinstaller/1.1.0_1/bin/ideviceinstaller
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 48 May 26 19:30 idevicename -> ../Cellar/libimobiledevice/1.2.0/bin/idevicename
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 61 May 26 19:30 idevicenotificationproxy -> ../Cellar/libimobiledevice/1.2.0/bin/idevicenotificationproxy
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 48 May 26 19:30 idevicepair -> ../Cellar/libimobiledevice/1.2.0/bin/idevicepair
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 53 May 26 19:30 ideviceprovision -> ../Cellar/libimobiledevice/1.2.0/bin/ideviceprovision
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 54 May 26 19:30 idevicescreenshot -> ../Cellar/libimobiledevice/1.2.0/bin/idevicescreenshot
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 50 May 26 19:30 idevicesyslog -> ../Cellar/libimobiledevice/1.2.0/bin/idevicesyslog
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 65 May 26 19:30 ios_webkit_debug_proxy -> ../Cellar/ios-webkit-debug-proxy/1.4_2/bin/ios_webkit_debug_proxy
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 35 May 26 19:30 iproxy -> ../Cellar/usbmuxd/1.0.10/bin/iproxy
-rwxr-xr-x 1 root admin 36032800 May 23 06:13 node
lrwxr-xr-x 1 IBRAHIMALHUSSAIN wheel 38 May 25 18:15 npm -> ../lib/node_modules/npm/bin/npm-cli.js
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 37 May 26 19:30 plistutil -> ../Cellar/libplist/1.12/bin/plistutil
lrwxr-xr-x 1 root wheel 51 May 26 19:25 vs-mda-remote -> ../lib/node_modules/vs-mda-remote/bin/vs-mda-remote
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 34 May 26 19:30 zipcmp -> ../Cellar/libzip/0.11.2/bin/zipcmp
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 36 May 26 19:30 zipmerge -> ../Cellar/libzip/0.11.2/bin/zipmerge
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 38 May 26 19:30 ziptorrent -> ../Cellar/libzip/0.11.2/bin/ziptorrent
IBRAHIM-ALHUSSAINs-Mac-mini:bin IBRAHIMALHUSSAIN$ sudo npm cache clear
Password:
IBRAHIM-ALHUSSAINs-Mac-mini:bin IBRAHIMALHUSSAIN$ sudo chown -R `whoami` npm
IBRAHIM-ALHUSSAINs-Mac-mini:bin IBRAHIMALHUSSAIN$ sudo chown -R `whoami` ~/npm
chown: /Users/IBRAHIMALHUSSAIN/npm: No such file or directory
IBRAHIM-ALHUSSAINs-Mac-mini:bin IBRAHIMALHUSSAIN$
IBRAHIM-ALHUSSAINs-Mac-mini:bin IBRAHIMALHUSSAIN$
IBRAHIM-ALHUSSAINs-Mac-mini:bin IBRAHIMALHUSSAIN$
IBRAHIM-ALHUSSAINs-Mac-mini:bin IBRAHIMALHUSSAIN$ ls -l
total 70672
-rwxr-xr-x 1 root wheel 24308 Sep 1 2014 HideMeService
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 37 May 26 19:30 asn1Coding -> ../Cellar/libtasn1/4.5/bin/asn1Coding
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 39 May 26 19:30 asn1Decoding -> ../Cellar/libtasn1/4.5/bin/asn1Decoding
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 37 May 26 19:30 asn1Parser -> ../Cellar/libtasn1/4.5/bin/asn1Parser
-rwxr-xr-x 1 IBRAHIMALHUSSAIN admin 791 May 26 19:30 brew
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 47 May 26 19:30 idevice_id -> ../Cellar/libimobiledevice/1.2.0/bin/idevice_id
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 50 May 26 19:30 idevicebackup -> ../Cellar/libimobiledevice/1.2.0/bin/idevicebackup
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 51 May 26 19:30 idevicebackup2 -> ../Cellar/libimobiledevice/1.2.0/bin/idevicebackup2
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 55 May 26 19:30 idevicecrashreport -> ../Cellar/libimobiledevice/1.2.0/bin/idevicecrashreport
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 48 May 26 19:30 idevicedate -> ../Cellar/libimobiledevice/1.2.0/bin/idevicedate
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 49 May 26 19:30 idevicedebug -> ../Cellar/libimobiledevice/1.2.0/bin/idevicedebug
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 60 May 26 19:30 idevicedebugserverproxy -> ../Cellar/libimobiledevice/1.2.0/bin/idevicedebugserverproxy
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 55 May 26 19:30 idevicediagnostics -> ../Cellar/libimobiledevice/1.2.0/bin/idevicediagnostics
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 57 May 26 19:30 ideviceenterrecovery -> ../Cellar/libimobiledevice/1.2.0/bin/ideviceenterrecovery
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 56 May 26 19:30 ideviceimagemounter -> ../Cellar/libimobiledevice/1.2.0/bin/ideviceimagemounter
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 48 May 26 19:30 ideviceinfo -> ../Cellar/libimobiledevice/1.2.0/bin/ideviceinfo
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 55 May 26 19:30 ideviceinstaller -> ../Cellar/ideviceinstaller/1.1.0_1/bin/ideviceinstaller
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 48 May 26 19:30 idevicename -> ../Cellar/libimobiledevice/1.2.0/bin/idevicename
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 61 May 26 19:30 idevicenotificationproxy -> ../Cellar/libimobiledevice/1.2.0/bin/idevicenotificationproxy
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 48 May 26 19:30 idevicepair -> ../Cellar/libimobiledevice/1.2.0/bin/idevicepair
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 53 May 26 19:30 ideviceprovision -> ../Cellar/libimobiledevice/1.2.0/bin/ideviceprovision
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 54 May 26 19:30 idevicescreenshot -> ../Cellar/libimobiledevice/1.2.0/bin/idevicescreenshot
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 50 May 26 19:30 idevicesyslog -> ../Cellar/libimobiledevice/1.2.0/bin/idevicesyslog
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 65 May 26 19:30 ios_webkit_debug_proxy -> ../Cellar/ios-webkit-debug-proxy/1.4_2/bin/ios_webkit_debug_proxy
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 35 May 26 19:30 iproxy -> ../Cellar/usbmuxd/1.0.10/bin/iproxy
-rwxr-xr-x 1 root admin 36032800 May 23 06:13 node
lrwxr-xr-x 1 IBRAHIMALHUSSAIN wheel 38 May 25 18:15 npm -> ../lib/node_modules/npm/bin/npm-cli.js
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 37 May 26 19:30 plistutil -> ../Cellar/libplist/1.12/bin/plistutil
lrwxr-xr-x 1 root wheel 51 May 26 19:25 vs-mda-remote -> ../lib/node_modules/vs-mda-remote/bin/vs-mda-remote
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 34 May 26 19:30 zipcmp -> ../Cellar/libzip/0.11.2/bin/zipcmp
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 36 May 26 19:30 zipmerge -> ../Cellar/libzip/0.11.2/bin/zipmerge
lrwxr-xr-x 1 IBRAHIMALHUSSAIN admin 38 May 26 19:30 ziptorrent -> ../Cellar/libzip/0.11.2/bin/ziptorrent
IBRAHIM-ALHUSSAINs-Mac-mini:bin IBRAHIMALHUSSAIN$
IBRAHIM-ALHUSSAINs-Mac-mini:bin IBRAHIMALHUSSAIN$
答案 0 :(得分:1)
如answer所示,您可以尝试运行
sudo chown -R `whoami` ~/.npm
(注意npm之前的“。”) 或
sudo chown -R $USER ~/.npm
如果这不能解决您的问题,请告诉我们
答案 1 :(得分:0)
我通过重新安装iOS的所有工具mentioned here解决了我的具体问题。现在,Visual Studio将在连接的Mac设备上使用我的Cordova应用程序成功启动iPhone模拟器。
然而,当我尝试
时 sudo chown -R $USER ~/.npm
或
sudo chown -R `whoami` ~/.npm
我仍然没有得到这样的文件或目录'由于某些原因。这是完整的终端输出:
IBRAHIM-ALHUSSAINs-Mac-mini:bin IBRAHIMALHUSSAIN$ sudo chown -R $USER ~/.npm
chown: /Users/IBRAHIMALHUSSAIN/.npm: No such file or directory
IBRAHIM-ALHUSSAINs-Mac-mini:bin IBRAHIMALHUSSAIN$ sudo chown -R `whoami` ~/.npm
chown: /Users/IBRAHIMALHUSSAIN/.npm: No such file or directory