npm install redis
运行ng serve后报错
解决方法:
npm install net
npm install tls
之后再运行ng serve后没有报错,但是进入页面后又有问题:
process is not defined at Object../node_modules/redis-errors/index.js (index.js:3) at __webpack_require__
解决方法:
在polyfills.ts中加入以下代码:
(window as any).global = window;
//global.Buffer = global.Buffer || require('buffer').Buffer;
global.process = require('process');
在运行ng serve后又报错: