0
我正在使用JavaScript和電子進行一個簡單的智能鏡像項目。我能夠在我的筆記本電腦上使用該軟件,但是當我將它移動到覆盆子pi時,我遇到了安裝npm的問題。進入「故宮安裝」後,我得到這個:試圖在Raspberry Pi上安裝npm錯誤
npm WARN package.json [email protected] No repository field.
npm ERR! 404 Not Found
npm ERR! 404
npm ERR! 404 'types/jquery' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'smart-mirror-server'
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 4.9.24-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/Desktop/smart-connected-mirror-master
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/Desktop/smart-connected-mirror-master/npm-debug.log
npm ERR! not ok code 0
我已經試過 sudo易於得到更新 以及 sudo易於得到升級
任何想法怎麼辦?謝謝!
編輯:
我更新了Node.js的一個更新版本,現在它沒有錯誤安裝。然而,當我在命令
npm start
類型我得到這個:
sh: 1: electron: Permission denied
npm ERR! Linux 4.9.24-v7+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! [email protected] start: `electron .`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the [email protected] start script 'electron .'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the smart-mirror- server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! electron .
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs smart-mirror-server
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls smart-mirror-server
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/.npm/_logs/2017-05-29T03_33_22_466Z-debug.log
您使用的Node.js版本非常舊。嘗試安裝更新的版本(例如v6)。說明可以在這裏找到:https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions – robertklep
可能重複的[爲什麼我只能安裝NPM 3.5.2版本在Ubuntu 16.04?](https://stackoverflow.com/questions/44095985/why-can-i-only-install-version-3-5-2-of-npm-on-ubuntu-16-04) – Aurora0001
嗨@robertklep我更新了node.js,現在它已經正確安裝。但是在輸入npm start命令後,我得到一個新的錯誤。我編輯了原帖以顯示此錯誤。我知道這些可能只是簡單的問題,但我並不熟悉這一切。謝謝。 – Grumpy96