Ionic 2 Error: Cannot find module "../"


#1

I’ve just upgraded my app to the latest release from a beta.11. It is been a while that I’ve used ionic so apologies if I’ve missed the obvious. I’ve done the following steps (copying everything in a new app) but getting an error when serving the app via ionic serve.

The this error I am getting is

main.js:17121 Uncaught Error: Cannot find module "../" 

which gets thrown by

throw new Error("Cannot find module \"../\"");

in main.js. It’s obvious that it can’t load a module, but it would be nice to know which module it can’t load. I have no clue, some help would be appreciated :slight_smile:


RC2: Can't resolve all parameters for Service
#2

are you using barrells (index.ts) files somewhere?

so somewhere you make thing like this:

import { xxx } from '../';

try using

import { xxx } from '../index';

#3

Yeah was stupid once again. After carefully looking in all my pages I found the culprit. Thanks for the help!


#4

I have the same problem , but i’m not using index.ts


#5

did you searched for ‘…/’ in your .ts files?


#6

i tried , still gives me this error
uncaught Error: Cannot find module “…/pages/add/add”(…)


#7

I use without “pages” folder.
Try it


#8

I have a error can someone help me please


#9

Try this:
import { AboutPage } from ‘…/about/about’;


#10

thanks for your reply mmaffet, my problem is resolved when i update the node js the lastest version.


#11

can someone help me i I didn’t understand this error please, i can’t open a new page html


#12

Is this issue is solved? I had the same issue when importing my service provider this time.