簡體   English   中英

無法在Ubuntu中安裝電子

[英]Cannot install electron in Ubuntu

我的npm版本是3.10.10

節點版本是v7.2.1

當我嘗試通過以下方式在ubuntu中安裝電子產品時:

sudo npm install electron --save-dev

我收到這樣的錯誤:

Error: read ECONNRESET
at exports._errnoException (util.js:1022:11)
at TLSWrap.onread (net.js:572:26)
npm WARN enoent ENOENT: no such file or directory, open '/home/dotmark/package.json'
npm WARN dotmark No description
npm WARN dotmark No repository field.
npm WARN dotmark No README data
npm WARN dotmark No license field.
npm ERR! Linux 3.13.0-87-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "electron" "--save-dev"
npm ERR! node v7.2.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! electron@1.4.13 postinstall: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@1.4.13 postinstall script 'node install.js'.
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 electron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/dotmark/npm-debug.log

除非您首先創建一個程序包(使用npm init或通過手動編寫package.json ),否則您無法將模塊添加到正在編寫的程序包的依賴項中( --save-dev )。

…但是不要將包的根目錄設為自己的主目錄。 為其創建目錄。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM