当我通过npm start启动角-2并在浏览器中刷新App页面时,我会得到以下错误:

现在,如果我在新选项卡中打开上述错误(如(https://npmcdn.com/rxjs@5.0.0-beta.6/operator/share.js) )中的一个URL,那么我将得到下面的error
无法在包rxjs@5.0.0-beta.6中找到模块"/operator/share.js“
但是,如果我再次刷新新选项卡,成功地获取它的代码正文,但无论如何,我仍然在我的App网页中获得上面的错误:
"use strict";
var multicast_1 = require('./multicast');
var Subject_1 = require('../Subject');
function shareSubjectFactory() {
return new Subject_1.Subject();
}
/**
* Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one
* Subscriber this Observable will be subscribed and emitting data. When all subscribers have unsubscribed it will
* unsubscribe from the source Observable. Because the Observable is multicasting it makes the stream `hot`.
* This is an alias for .publish().refCount().
*
* <img src="./img/share.png" width="100%">
*
* @return {Observable<T>} an Observable that upon connection causes the source Observable to emit items to its Observers
* @method share
* @owner Observable
*/
function share() {
return multicast_1.multicast.call(this, shareSubjectFactory).refCount();
}
exports.share = share;
;
//# sourceMappingURL=share.js.mapCannot find module....,但是经过刷新,我得到了它的代码体?发布于 2018-06-20 21:23:02
我找到了解决办法:
在settingjs.config.js文件中而不是
'rxjs': 'https://npmcdn.com/rxjs@5.0.0-beta.6',我用:
'rxjs': 'node_modules/rxjs',https://stackoverflow.com/questions/50953142
复制相似问题