2016-01-08 69 views
2

) 我無法安裝history.js在Ubuntu 15.10上使用npm。無法安裝history.js使用npm

節點V5.0.0

NPM V3.5.3

登錄:

sudo npm i history 

> [email protected] postinstall /media/programs/WEB/Projects/React/Redux/node_modules/history 
> node ./npm-scripts/postinstall.js 

module.js:339 
    throw err; 
    ^

Error: Cannot find module '/media/programs/WEB/Projects/React/Redux/node_modules/history/npm-scripts/postinstall.js' 
    at Function.Module._resolveFilename (module.js:337:15) 
    at Function.Module._load (module.js:287:25) 
    at Function.Module.runMain (module.js:457:10) 
    at startup (node.js:136:18) 
    at node.js:972:3 
npm WARN optional Skipping failed optional dependency /chokidar/fsevents: 
npm WARN notsup Not compatible with your operating system or architecture: [email protected] 
npm ERR! Linux 4.2.0-22-generic 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "history" 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] postinstall: `node ./npm-scripts/postinstall.js` 
npm ERR! Exit status 1 
npm ERR! Failed at the [email protected] postinstall script 'node ./npm-scripts/postinstall.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 history package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node ./npm-scripts/postinstall.js 

你有什麼想法?

對不起,我的英語。

回答

3

這是一些軟件包在某些操作系統上不支持的老問題。在npm 3.3.12之前,[email protected]發生了同樣的問題,但它在3.3.12中已經修復。

現在在npm 3.5.3中,它再次創建問題,以便您可以等待下一次構建npm。

你可以閱讀這個here