如果将SystemJS进程添加为依赖项,则在使用Range2RC.5中的默认配置时,lite-服务器抛出进程的错误不被定义为。有人经历过吗?下面是跟踪堆栈:
(index):43 Error: ReferenceError: process is not defined at Object.eval (http://localhost:3000/node_modules/redux/lib/index.js:38:5) at eval (http://localhost:3000/node_modules/redux/lib/index.js:47:4) at eval (http://localhost:3000/node_modules/redux/lib/index.js:48:3) at Object.eval (http://localhost:3000/node_modules/ng2-redux/lib/components/ng-redux.js:14:15) Evaluating http://localhost:3000/node_modules/redux/lib/index.js Evaluating http://localhost:3000/node_modules/ng2-redux/lib/components/ng-redux.js Evaluating http://localhost:3000/node_modules/ng2-redux/lib/index.js Evaluating http://localhost:3000/actions/session.actions.js Evaluating http://localhost:3000/app/app.component.js Evaluating http://localhost:3000/app/app.module.js Evaluating http://localhost:3000/app/main.js Error loading http://localhost:3000/app/main.js
发布于 2016-08-24 02:06:23
对于堆栈溢出记录,重复我对github上相同问题的回答:https://github.com/angular-redux/ng2-redux/issues/202
尝试将其放入system.config.js中:
var map = {
/* ... */
'ng2-redux': 'node_modules/ng2-redux',
'redux': 'node_modules/redux',
};
var packages = {
/* ... */
'ng2-redux': { main: 'lib/index.js', defaultExtension: 'js' },
'redux': { main: 'dist/redux.js', defaultExtension: 'js' },
};https://stackoverflow.com/questions/39110223
复制相似问题