
获得徽章 0
- Uncaught ReferenceError: global is not defined
在 index.html 中写入:
var global = global || window;
var Buffer = Buffer || [];
var process = process || {
env: { DEBUG: undefined },
version: []
};
或者在 polyfills.ts 中写入:
(window as any).global = window;
参考:stackoverflow.com
展开赞过评论1 - #水·滴#
Angular 中报 ERROR in ./node_modules/aws-sign2/index.js Module not found: Error: Can't resolve 'crypto' in '/Users/MYPC/Documents/Myproj/ProName/node_modules/aws-sign2'
类似错误的,在package.json 中 配置:
"browser": {
"crypto": false,
"stream": false
}
参考:stackoverflow.com
展开赞过评论1