簡體   English   中英

Npm引發錯誤

[英]Npm throws error

我在使用npm時遇到了一個非常嚴重的問題,當我嘗試獲取像bluebird或fs這樣的api時,我不能這樣做,因為npm會向我拋出該錯誤。

npm install bluebird -g
npm WARN npm npm does not support Node.js v0.8.20
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm You can find the latest version at https://nodejs.org/

/usr/local/lib/node_modules/npm/lib/install.js:298
        [this, (next) => { computeMetadata(this.idealTree); next() }],
                       ^
npm ERR! Unexpected token >

我是ubuntu的新手,我不知道如何解決這個問題,請您能幫我嗎

對我來說,發生的事情是與舊版本的節點發生命名沖突,因此我嘗試安裝的新版本被忽略。 我會被告知我擁有最新版本的node和npm,但是這被舊版本掩蓋了。 要修復它,我必須使用以下方法完全卸載它:

sudo apt-get remove --purge節點

http://www.hostingadvice.com/how-to/install-nodejs-ubuntu-14-04/

暫無
暫無

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

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