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

你可能感兴趣的:(报错)