Join the Stack Overflow Community
Stack Overflow is a community of 6.6 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

I've been developing a simple app in Ionic 2 and I tried using mock service (in-memory web API) for fetching data as described in this Angular 2 tutorial. My console reported this error:

TypeScript error: app/app.ts(11,49): Error TS2307: Cannot find module 'angular2-in-memory-web-api'.

I tried this solution: angular2-in-memory-web-api 404 error. After running this: npm i angular2-in-memory-web-api --save, I was unable to find the files where I was supposed to use the code provided in the rest of the solution.

How can I fix this? Sorry if the question is not posed quite right, this is my first one. Please ask if any additional information is needed. The problem is pretty much the same as the one for which the solution was provided in the link above, except that using Ionic 2 makes the given solution inapplicable in my case. I'm don't think SystemJS is being used, please see my file structure image.

Image of my file structure.

share|improve this question
    
Are you using SystemJS? In that case you need to map in SystemJS config as the other files. – MrJSingh Aug 9 '16 at 19:30
    
I don't think so... I've appended the image of my file structure, it should provide an overview over what is being used, at least a partial one. I just followed the installation instructions on the framework's website, I didn't really do all the files myself. – TangledHeadphones Aug 9 '16 at 19:56
    
How's your SystemJS config looks? – MrJSingh Aug 9 '16 at 20:09
    
I don't know, I can't find it if I even have it. If I could find it, then I could implement the previous solution. – TangledHeadphones Aug 9 '16 at 21:06
    
It seems that Ionic 2 doesn't use SystemJS by default. It is not defined in the package.json, I just checked. – TangledHeadphones Aug 9 '16 at 21:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.