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

前端 未结 29 2313
青春惊慌失措
青春惊慌失措 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:52

    It works for me:

    In package.json dependencies block set ( use "angular" instead of "angular2")

    "angular-in-memory-web-api": "^0.3.2",
    

    Then run

     npm install
    

    OR

    simply just run (my preferable)

    npm install angular-in-memory-web-api --save
    

提交回复
热议问题