0

When I run ionic serve, it builds the app but the server isn't run. Here's the trail:

    Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 
--dev-logger-port 53703 --nobrowser - Ctrl+C to cancel
[17:55:35]  watch started ... 
[17:55:35]  build dev started ... 
[17:55:36]  clean started ... 
[17:55:36]  clean finished in 2 ms 
[17:55:36]  copy started ... 
[17:55:36]  deeplinks started ... 
[17:55:37]  deeplinks finished in 589 ms 
[17:55:37]  transpile started ... 
[17:55:44]  transpile finished in 7.38 s 
[17:55:44]  preprocess started ... 
[17:55:44]  copy finished in 8.56 s 
[17:55:44]  preprocess finished in 206 ms 
[17:55:44]  webpack started ... 

After webpack started the cli just exits and i see the normal terminal prompt.

Trying out the npm run ionic:serve command instead results into this error:

TypeError: Cannot read property 'substr' of undefined

So far I've re-installed ionic, same result. A bit unsure how to deal with this one...

David Haddad
  • 3,796
  • 8
  • 32
  • 40

1 Answers1

0

It turns out that this is caused when creating multiple component classes in one ts file. Splitting those classes each into their own file solves the problem.

Related to this https://github.com/ionic-team/ionic-app-scripts/issues/796

David Haddad
  • 3,796
  • 8
  • 32
  • 40