2016-02-22 35 views
7

Tôi đang trên debess jessie và tôi đang cố gắng thiết lập khuôn khổ phượng hoàng. Tôi đã tạo một ứng dụng phượng hoàng mới với mix phoenix.new và sau đó tôi nhập vào thư mục đó. Khi tôi chạy 'npm install', tôi nhận được các lỗi này:NPM Lỗi cài đặt với Phoenix Framework

sudo npm install 
npm ERR! git clone [email protected]:file:deps/phoenix_html Cloning into bare repository '/root/.npm/_git-remotes/git-github-com-file-deps-phoenix-html-50a27b71'... 
npm ERR! git clone [email protected]:file:deps/phoenix_html Permission denied (publickey). 
npm ERR! git clone [email protected]:file:deps/phoenix_html fatal: Could not read from remote repository. 
npm ERR! git clone [email protected]:file:deps/phoenix_html 
npm ERR! git clone [email protected]:file:deps/phoenix_html Please make sure you have the correct access rights 
npm ERR! git clone [email protected]:file:deps/phoenix_html and the repository exists. 
npm ERR! 404 Not Found 
npm ERR! 404 
npm ERR! 404 'phoenix_html' is not in the npm registry. 
npm ERR! 404 You should bug the author to publish it 
npm ERR! 404 
npm ERR! 404 Note that you can also install from a 
npm ERR! 404 tarball, folder, or http url, or git url. 

npm ERR! System Linux 3.16.0-4-amd64 
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" 
npm ERR! cwd /home/andy/Phoenix/test_phoenix 
npm ERR! node -v v0.10.29 
npm ERR! npm -v 1.4.21 
npm ERR! code E404 
npm ERR! git clone [email protected]:file:deps/phoenix Cloning into bare repository '/root/.npm/_git-remotes/git-github-com-file-deps-phoenix-c83d6c1a'... 
npm ERR! git clone [email protected]:file:deps/phoenix Permission denied (publickey). 
npm ERR! git clone [email protected]:file:deps/phoenix fatal: Could not read from remote repository. 
npm ERR! git clone [email protected]:file:deps/phoenix 
npm ERR! git clone [email protected]:file:deps/phoenix Please make sure you have the correct access rights 
npm ERR! git clone [email protected]:file:deps/phoenix and the repository exists. 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /home/andy/Phoenix/test_phoenix/npm-debug.log 
npm ERR! not ok code 0 

Sự cố là gì?

+1

Gói 'phoenix_html' chỉ [không tồn tại] (https://www.npmjs.com/package/phoenix_html) trên npm – peteb

+1

@peteb là đúng nhưng tôi cũng muốn thêm rằng bạn có thể thêm địa phương phụ thuộc vào các gói npm quá dường như là những gì đang xảy ra ở đây. 'tệp: deps' chỉ ra rằng có một số phụ thuộc cục bộ mà bạn không kéo cho khung công tác phượng hoàng. – shriek

+0

Có nghĩa là bạn có thể cần phải làm 'mix deps.get', vì phoenix_html là một phụ thuộc elixir của phượng hoàng. –

Trả lời

4

Một trong những cách để cài đặt phiên bản mới nhất với nvm. Đối với tôi, nó rất hữu ích. Lúc đầu loại bỏ phiên bản cũ.

sudo apt-get remove nodejs 

Và cài đặt mới nhất một

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash 
nvm install 5.0 
nvm use 5.0 
1

tôi đã có lỗi tương tự sau đó nhận ra tôi đã sử dụng một phiên bản cũ của nút. Giải pháp là cập nhật nút thành mới hơn v5.0.0.

Các vấn đề liên quan