npm錯誤 - 筆記搬遷5

1、npm install

[vagrant@centos6 ~]$ npm i -g npm
npm ERR! code EINTEGRITY
npm ERR! sha512-ZJsOWVJ25E2C5Qedf4w9ePIv5hrPCdDIsHhq89tRxSJCqyIfDAMh0KoU9xeTu7yHT9ZrxPF7mopq1TCWxtMfkw== integrity checksum failed when using sha512: wanted sha512-ZJsOWVJ25E2C5Qedf4w9ePIv5hrPCdDIsHhq89tRxSJCqyIfDAMh0KoU9xeTu7yHT9ZrxPF7mopq1TCWxtMfkw== but got sha512-GKBrPUNL4HNRI9V4E08l1XglSQo0U8PljSw59tyTzRygSoT49y5rlY3CDsXskJZC9G/amEYyPbo/uXvJjYwDjQ==. (32242 bytes)

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vagrant/.npm/_logs/2017-08-11T05_18_53_057Z-debug.log

解決

[vagrant@centos6 ~]$ npm cache clean --force && npm cache verify
[vagrant@centos6 ~]$ npm install

2、虛擬機中(windows創建unix)BUG

[root@centos6 datang]# npm install
npm WARN deprecated express@2.5.11: express 2.x series is deprecated
npm WARN deprecated connect@1.9.2: connect 1.x series is deprecated
npm WARN ETXTBSY: text file is busy, rmdir '/vagrant/datang/node_modules/fsevents/build/Release/.deps/Users/eshanker/Code'
npm ERR! path ../acorn/bin/acorn
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink
npm ERR! EPROTO: protocol error, symlink '../acorn/bin/acorn' -> '/vagrant/datang/node_modules/.bin/acorn'

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2017-08-11T05_51_28_826Z-debug.log

解決:由於host os不支持linux的symbol link,所以必須使用:npm install –no-bin-links命令

[root@centos6 datang]# npm install --no-bin-links
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章