Angular2 Tutorial (Tour of Heroes): Cannot find module 'angular2-in-memory-web-api'

前端 未结 29 2268
青春惊慌失措
青春惊慌失措 2020-11-29 06:25

I have followed the Tutorial. After changing app/maint.ts in the Http chapter I get the error when starting the app via command line:

ap

29条回答
  •  庸人自扰
    2020-11-29 06:50

    As of latest (currently 0.1.14), this is what's stated in the CHANGELOG

    In systemjs.config.js you should change the mapping to:

    'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js'
    

    then delete from packages:

    'angular-in-memory-web-api': {        
       main: './index.js',     
       defaultExtension: 'js'      
    }
    

提交回复
热议问题