命令行执行npm install报错如下:
D:\frontend\viewsdev>npm install
npm ERR! code EINTEGRITY
npm ERR! sha512-8qtu6VYSXUExVPx6H8s8+OhQo0UQP7ogAoOa2bOPCvnhlpaGVYf3yh45WNa7PhhdWSOGQW3DdblqMX8UJ7Cu6g== integrity checksum failed when using sha512: wanted sha512-8qtu6VYSXUExVPx6H8s8+OhQo0UQP7ogAoOa2bOPCvnhlpaGVYf3yh45WNa7PhhdWSOGQW3DdblqMX8UJ7Cu6g== but got sha512-OvgW+e/pBS2QuX5CTDaaE+DM62t8mMk+IJfcpE3Zv1DC03DwoOKcyqRHlA+lkXWahSOPmvYZJSEDUKX0nOeLDw==. ( bytes)
后来发现是npm版本问题,需要更新至最新版本:
D:\frontend\viewsdev>npm install -g npm
C:\Users\wulf\AppData\Roaming\npm\npx -> C:\Users\wulf\AppData\Roaming\npm\node_modules\npm\bin\npx-cli.js
C:\Users\wulf\AppData\Roaming\npm\npm -> C:\Users\wulf\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
+ npm@6.3.
added packages in .85s
重新install成功:
D:\frontend\viewsdev>npm install > wlf@1.0. preinstall D:\frontend\viewsdev
> npm install ./local_modules/my-htmlone ./local_modules/my-url-loader npm WARN deprecated gulp-util@3.0.: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated CSSselect@0.4.: the module is now available as 'css-select'
npm WARN deprecated CSSwhat@0.4.: the module is now available as 'css-what'
npm WARN url-loader@0.5. requires a peer of file-loader@* but none is installed. You must install peer dependencies yourself.
npm WARN wlf@1.0. No repository field. + my-htmlone@0.1.
+ my-url-loader@0.5.
updated packages and audited packages in .198s
found vulnerabilities ( low, moderate)
run `npm audit fix` to fix them, or `npm audit` for details
npm WARN deprecated babel-preset-es2015@6.24.: