Tôi có Ứng dụng Cordova được phát triển bằng Visual Studio 2015 IDE. Để quản lý thư viện và phụ thuộc, tôi đã thử sử dụng NuGet. Nhưng có vẻ như, NuGet không thể quản lý các kịch bản lệnh phía máy khách, tức là CSS. Vì vậy, tôi đã khám phá BOWER. Tôi đã cài đặt bower bằng lệnh npm installl -g bower
và bây giờ tôi có thể truy cập tất cả các lệnh Bower.Không thể cài đặt Gói Bower
Khi tôi cố gắng thêm các phụ thuộc như jQuery và jQuery Mobile, Thử tìm nạp và không thành công. Các lỗi nó mang lại là,
PATH=.\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\Bower.cmd" install --force-latest
bower retry Request to https://bower.herokuapp.com/packages/jquery-mobile failed with ECONNRESET, retrying in 1.5s
bower retry Request to https://bower.herokuapp.com/packages/jQuery failed with ECONNRESET, retrying in 1.4s
bower retry Request to https://bower.herokuapp.com/packages/jQuery failed with ECONNRESET, retrying in 3.0s
bower retry Request to https://bower.herokuapp.com/packages/jquery-mobile failed with ECONNRESET, retrying in 3.1s
bower retry Request to https://bower.herokuapp.com/packages/jQuery failed with ECONNRESET, retrying in 4.8s
bower retry Request to https://bower.herokuapp.com/packages/jquery-mobile failed with ECONNRESET, retrying in 7.0s
bower retry Request to https://bower.herokuapp.com/packages/jQuery failed with ECONNRESET, retrying in 9.7s
bower retry Request to https://bower.herokuapp.com/packages/jquery-mobile failed with ECONNRESET, retrying in 8.5s
bower retry Request to https://bower.herokuapp.com/packages/jQuery failed with ECONNRESET, retrying in 26.5s
bower retry Request to https://bower.herokuapp.com/packages/jquery-mobile failed with ECONNRESET, retrying in 25.6s
bower jQuery#* ECONNRESET Request to https://bower.herokuapp.com/packages/jQuery failed: tunneling socket could not be established, cause=connect ETIMEDOUT
====Executing command 'npm install'====
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
====npm command completed with exit code 0====
tôi duyệt và người ta nói rằng tôi phải thiết lập proxy như,
http_proxy = http://<user>:<password>@<your company proxy>:<port>
https_proxy= http://<user>:<password>@<your company proxy>:<port>
hoặc tạo một file có tên .bowerrc và đặt mã để vượt qua proxy.
{
"directory": "library",
"registry": "http://bower.herokuapp.com",
"proxy":"http://<USERNAME>:<PASSWORD>@<PROXY_IP>:<PROXY_PORT>/",
"https-proxy":"http://<USERNAME>:<PASSWORD>@<PROXY_IP>:<PROXY_PORT>/"
}
Nhưng không có gì hiệu quả. Bây giờ tôi đã thử với mạng mở với Không có proxy, tôi nhận được lỗi tương tự. Tôi có thiếu bất kỳ bước cơ bản nào không?
Tôi cũng đã thử từ cửa sổ nhắc lệnh. Có lỗi tương tự.
bạn có thể truy cập https://bower.herokuapp.com/packages bằng trình duyệt không? – Shuping
Có, tôi có thể truy cập tương tự từ trình duyệt. URL ** https: //bower.herokuapp.com/packages/jQuery** đã cho tôi câu trả lời '{" name ":" jQuery "," url ":" git: //github.com/jquery/jquery. git "," hits ": 47370}' – Joseph
Đã thử cài đặt lại NodeJ, Cordova và Bower. Nhưng không thể làm đúng. Bất cứ ai có thể chia sẻ ý tưởng của họ giúp tôi giải quyết vấn đề. Thử nghiệm nhiều chủ đề và blog nhưng không may mắn – Joseph