Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.
This repository was archived by the owner on May 1, 2020. It is now read-only.

ionic serve Error opening the Browser #304

Closed
@martinlombana

Description

@martinlombana

Short description of the problem:

ionic serve yields Error opening the Browser

What behavior are you expecting?

That it serves my app

Steps to reproduce:
It's tricky because sometimes it works, others it doesn't.

  1. Create a project
  2. ionic serve
  3. it hangs there and we can see that it is writing to ionic.config.json the line: "defaultBrowser": true
    Even if you remove it before executint the command.

Also if you force chrome, it doesn't work either.

Which @ionic/app-scripts version are you using?
Your system information:

Cordova CLI: 6.4.0
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.4
Ionic App Lib Version: 2.1.2
Ionic App Scripts Version: 0.0.39
OS: WINDOWS 10 x64 (By the way, not reported by ionic info)
Node Version: v6.4.0

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
(suntrack) D:\Sync\Martin\inProgress\p4q\suntrack_home>ionic serve -platform ios

Running 'serve:before' npm script before serve

ionic-hello-world@ watch D:\Sync\Martin\inProgress\p4q\suntrack_home
ionic-app-scripts watch

[23:46:46] ionic-app-scripts 0.0.39
[23:46:46] watch started ...
[23:46:46] build dev started ...
[23:46:46] clean started ...
[23:46:46] clean finished in 5 ms
[23:46:46] copy started ...
[23:46:46] transpile started ...
[23:46:47] lint started ...
[23:46:49] lint finished in 2.25 s
[23:46:50] transpile finished in 3.26 s
[23:46:50] webpack started ...
[23:46:50] copy finished in 3.40 s
[23:46:57] webpack finished in 7.29 s
[23:46:57] sass started ...
[23:46:58] sass finished in 1.47 s
[23:46:58] build dev finished in 12.09 s
[23:46:59] watch ready in 12.67 s
Running live reload server: http://localhost:true
Watching: www//*, !www/lib//, !www/**/.map
√ Running dev server: http://localhost:true
Error opening the browser - TypeError: s.replace is not a function
at escape (C:\Users\marti\AppData\Roaming\npm\node_modules\ionic\node_modules\open\lib\open.js:62:12)
at open (C:\Users\marti\AppData\Roaming\npm\node_modules\ionic\node_modules\open\lib\open.js:40:31)
at Object.openBrowser (C:\Users\marti\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\serve.js:240:7)
at C:\Users\marti\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\serve.js:510:15
at _fulfilled (C:\Users\marti\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\marti\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\marti\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:749:13)
at C:\Users\marti\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:557:44
at flush (C:\Users\marti\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
Ionic server commands, enter:
restart or r to restart the client app from the root
goto or g and a url to have the app navigate to the given url
consolelogs or c to enable/disable console log output
serverlogs or s to enable/disable server log output
quit or q to shutdown the server and exit

ionic $ q

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions