Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ionic serve --lab fails with error Cannot GET //__ion-dev-server/ionic_lab.html #1666

Closed
faraazc opened this issue Nov 12, 2016 · 5 comments
Closed

Comments

@faraazc
Copy link

faraazc commented Nov 12, 2016

Short description of the problem:

ionic serve --lab fails with error Cannot GET //__ion-dev-server/ionic_lab.html
However ionic serve works (i.e. without lab option)
This is happening after upgrading ionic cli to 2.1.8 and ionic framework to 2.0.0-rc.2 and App scripts to 0.0.43

http://localhost:8100//__ion-dev-server/ionic_lab.html Failed to load resource: the server responded with a status of 404 (Not Found)

What behavior are you expecting?

i am expecting ios, android and windows previews

Steps to reproduce:

  1. upgrade app to use ionic cli to 2.1.8 and ionic framework to 2.0.0-rc.2 and App scripts to 0.0.43
  2. run command sudo ionic serve --lab on terminal
  3. see the output on browser window
insert any relevant code between the above and below backticks

Post the output of ionic info below please
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.1.8
Ionic App Lib Version: 2.1.4
Ionic App Scripts Version: 0.0.43
ios-deploy version: Not installed
ios-sim version: Not installed
OS: macOS Sierra
Node Version: v6.7.0

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

@savanvadalia
Copy link

Exactly same issue when running with ionic serve --lab on windows

Here is my system info

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.1.8
Ionic App Lib Version: 2.1.4
Ionic App Scripts Version: 0.0.43
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.9.1
Xcode version: Not installed

@savanvadalia
Copy link

Changing the scripts in package.json as below works fine. Please note the difference of the word ionic.
Don't know the implications of doing this. I found the solution from here
https://forum.ionicframework.com/t/ionic-serve-lab-dont-work-in-rc2/69862/8

FROM

  "scripts": {
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },

TO

"scripts": {
    "build": "ionic-app-scripts build",
    "serve": "ionic-app-scripts serve"
}  

@FrancescoMussi
Copy link

This solution worked for me:

"scripts": {
  "build": "ionic-app-scripts build",
  "watch": "ionic-app-scripts watch",
  "serve:before": "watch",
  "emulate:before": "watch",
  "deploy:before": "build",
  "build:before": "build",
  "run:before": "watch"
},

SO link:

https://stackoverflow.com/questions/40561794/cannot-get-ion-dev-server-ionic-lab-html-in-ionic-2-1-8

@jthoms1
Copy link
Member

jthoms1 commented Nov 15, 2016

This is resolved in relase 0.0.44 of @ionic/app-scripts. Please update and also ensure you are using the latest version of the CLI.

npm install --save-dev @ionic/app-scripts@latest
npm install -g ionic@latest

@jthoms1 jthoms1 closed this as completed Nov 15, 2016
@ohmzi
Copy link

ohmzi commented May 21, 2019

sudo npm install --save-dev --unsafe-perm node-sass

@ionic-team ionic-team locked and limited conversation to collaborators May 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants