I created an ionic2 app and immediately run ionic serve. Everything look good in my command line but it shows white screen in browser. I found error message in the console the reads:
webpack:///./src/pages/tabs/tabs.ts?:1 Uncaught Error: Module build failed: TypeError: Cannot read property 'content' of undefined
at Object.typescriptSourcemapLoaderMemory (C:\Dev\MobileApps\myApp\node_modules\@ionic\app- scripts\dist\webpack\typescript-sourcemap-loader-memory.js:18:34)
at Object.typescriptSourcemapLoaderMemory (C:\Dev\MobileApps\myApp\node_modules\@ionic\app-scripts\dist\webpack\typescript-sourcemap-loader-memory.js:18:34)
at eval (webpack:///./src/pages/tabs/tabs.ts?:1:7)
at Object.<anonymous> (http://localhost:8100/build/main.js:1463:1)
at __webpack_require__ (http://localhost:8100/build/main.js:20:30)
at eval (webpack:///./src/app/app.component.ts?:4:75)
at Object.<anonymous> (http://localhost:8100/build/main.js:3184:1)
at __webpack_require__ (http://localhost:8100/build/main.js:20:30)
at eval (webpack:///./src/app/app.module.ts?:3:73)
at Object.<anonymous> (http://localhost:8100/build/main.js:3170:1)
at __webpack_require__ (http://localhost:8100/build/main.js:20:30)
at eval (webpack:///./src/app/main.dev.ts?:2:70)
Has anybody come across this issue? How can it be resolved?
Had the same error after upgrading to ionic-app-scripts 0.0.44. It seems like it tries to access one of my .ts file in title case, (like …/User/User.ts instead of …/user/user.ts) and after that it gets undefined.
The package.json script section should look like this.
That would be a good first step in tracking this down. Once you have that in place, can you provide more info on what’s going on so we can try to resolve it. Can you run ionic info in your project directory, etc.